Pecl install sqlsrv returns No releases available for package

蓝咒 提交于 2021-01-27 19:34:00

问题


While installing sqlsrv module for PHP7 i'm getting following error -

No releases available for package "pecl.php.net/sqlsrv

Command used

sudo pecl install sqlsrv 

Any idea how to resolve this issue?


回答1:


Same problem here... Solved installing modules as root this way (Ubuntu 16.04):

    wget http://pecl.php.net/get/sqlsrv-4.3.0.tgz
    pear install sqlsrv-4.3.0.tgz

    wget http://pecl.php.net/get/pdo_sqlsrv-4.3.0.tgz
    pear install pdo_sqlsrv-4.3.0.tgz

You can check latests available versions here: http://pecl.php.net/package-search.php?pkg_name=sqlsrv&bool=AND&submit=Search

And check if php modules are enabled after installation:

    php -m | grep sqlsrv   



回答2:


For corporate proxy users, you might just need to tell pear to use your proxy.

pear config-set http_proxy http://proxy.example.com:8080



回答3:


Try to install a certain version that you know exists:

$ pecl install sqlsrv-4.3.0

Also try to clear the cache:

$ pear clear-cache


来源:https://stackoverflow.com/questions/45220954/pecl-install-sqlsrv-returns-no-releases-available-for-package

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!