问题
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