Pecl install sqlsrv returns No releases available for package
Asked Answered
P

5

5

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?

Pogge answered 20/7, 2017 at 17:0 Comment(2)
what command are you running?Tenebrous
@SamuelCook updated my question -Sorry about that.Pogge
V
6

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   
Virgule answered 8/3, 2018 at 10:23 Comment(0)
S
1

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
Sinter answered 15/8, 2017 at 11:2 Comment(2)
No releases available for package "pecl.php.net/sqlsrv" install failedAristarchus
clearing the cache worked, thanks.Fairhaired
T
1

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
Treadway answered 21/8, 2018 at 16:59 Comment(0)
G
0

Sometimes pecl.php.net is not available or down. In this case pecl install may show "no releases available".

Just for information.

Government answered 30/1, 2021 at 22:20 Comment(0)
A
0

The installation of pecl/sqlsrv requires PHP version >= 7.2.0. sqlsrv extension for PHP 7.1 was removed from pecl repository.

Precompiled binaries for older sqlsrv which support PHP 7.1 can be found at https://github.com/microsoft/msphpsql/releases/tag/v5.6.1.

Precompiled binaries for older sqlsrv which support PHP 7.0 can be found at https://github.com/microsoft/msphpsql/releases/tag/v5.3.0

It is also possible to use an older system version of PHP. For example, in order to connect to MSSQL on CentOS 7 with system PHP version 5.4, the following command needed to be executed:

yum install epel-release
yum install php-mssql

Instructions for installing Microsoft driver for SQL Server Linux can be found here: https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver16&tabs=alpine18-install%2Calpine17-install%2Cdebian8-install%2Credhat7-13-install%2Crhel7-offline

Instructions for PLESK users: https://support.plesk.com/hc/en-us/articles/12377482190999--How-to-install-the-sqlsrv-extension-for-the-Plesk-PHP-handlers-

Afterword answered 16/6, 2023 at 12:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.