-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unable to install version 4.0.7+ on ubuntu 16.04 using pecl #213
Comments
Same error on oficial PHP docker image (debian) |
Same issue on docker image php:7.0-fpm with updated libc6 package. |
OK I have some further info regarding this issue. I installed a fresh virtual machine using Ubuntu 16.04 as in my original machine and tested on that system. The However, I then also tried to compile a new php version from source and and try to install sqlsrv on that one using pecl. It always fails when you try to install to the custom php version no matter what options you build php with. Probably that's similar to what's happening using docker image. @Hadis-Fard all the prerequisites on the link you sent are installed on both my Ubuntu 16.04 systems and although I can't try on my main system using the default php version, the result is consistent when compiling from source in both machines with the same error. I can confirm it worked OK for the fresh Ubuntu system with default PHP from repos. |
@vandammeb I can confirm this. I tested it in a php:7.1 Docker container. pecl install sqlsrv failed with the "cannot create directory 'shared/.libs'" error message. When I quickly create a "mkdir /tmp/pear/temp/pear-build-defaultuserXXXXXX/sqlsrv-4.0.8/shared" folder manually the build process completed successfully. |
I have the same problem on php7.1-fpm docker image. sqlsrv-4.0.6 works perfect, both 4.0.7 and 4.0.8 fail on mkdir. |
@GodWolen Seems like there in an issue with our 4.0.6+ PECL packages. We are looking into this actively. |
@GodWolen @bla-kw @ioweb-gr Can you try the latest PECL package (4.1.6.1)?
|
@meet-bhagdev , I actually came across this issue today when attempting to install sqlsrv-4.0.8 on a docker image from pecl. I updated to 4.1.6.1 and the fail did not occur. Cheers. |
I've managed to install it as well. Nice job |
Awesome! @ALL we are going to close this now. v4.1.6 fixes this issue. Feel free to reopen if you are still running into problems. |
Im getting the following error cc1plus: error: unrecognized command line option "-std=c++11" config PHP Api Version: 20151012 gcc -v |
@jebarco1 What is the output for g++ -v? |
Hi, libtool: link: cc -shared -fPIC -DPIC .libs/conn.o .libs/util.o .libs/init.o .libs/stmt.o shared/.libs/core_conn.o shared/.libs/core_results.o shared/.libs/core_stream.o shared/.libs/core_init.o shared/.libs/core_stmt.o shared/.libs/core_util.o shared/.libs/FormattedPrint.o shared/.libs/localizationimpl.o shared/.libs/StringFunctions.o -lstdc++ -lodbc -lodbcinst -g -O2 -Wl,-soname -Wl,sqlsrv.so -o .libs/sqlsrv.so My config : I also placed php_pdo_sqlsrv_7_nts.so in /usr/local/lib/ but don't know how to manually install it in PHP or in odbc ini file.. Can you help me ? |
Hi @Meloman-zz , Please follow these steps to load php_pdo_sqlsrv_7_nts.so
Regarding the PECL install issue, looks like you are missing a shared dependency or it is static. Let me know if you were able to load php_pdo_sqlsrv_7_nts.so. |
Hi, So, the command for me is : After that I restarted apache and run If I execute |
So I just found that I need to insert it in the cli/php.ini instead of the apache2/php.ini but the same error comes again about the libodbc.so.2 missing when I execute PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php_pdo_sqlsrv_7_nts.so' - libodbc.so.2: cannot open shared object file: No such file or directory in Unknown on line 0 |
I suspect unixODBC is not properly installed in your machine. Please post the output of the following commands:
|
odbcinst -j odbcinst -q -d -n "ODBC Driver 13 for SQL Server" sudo find /usr 2>/dev/null -name "libodbc*" php -i | grep "Configure Command" |
Your unixODBC installation is missing libodbc.so.2. You might have accidentally removed that file or unixODBC installation did not finish properly. You can run I would suggest to uninstall unixodbc and install the latest package. If the current unixodbc package was installed with Once uninstall is done, you can run You can also check this page for end to end installation instructions. Let me know if this helps. |
Well, Yes I know that a file is missing, but not why and how to fix it 😒 So, thanks a lot for your help 👍 Running I just run Now When I execute again And for I called this first So, I'll try to install the SQL driver again with command I installed missing The same as 7 days ago ! |
Hi @Meloman-zz, This is what
Your unixodbc installation is still broken. Please post the full stacktrace of the following commands in the same order, I will try to figure out what went wrong.
|
Ok @ulvii I run this 5 steps in this order :
|
Hi @Meloman-zz , Apparently |
I have the same error, I could solve the issue with installing |
@schmanat thanks bro u saved my day |
@schmanat thanks a lot |
@schmanat thanks mate |
Hi,
I'm trying to install sqlsrv and pdo_sqlsrv using pecl on php 7.0.14 however it fails with an error.
I was also following the tutorial at https://www.microsoft.com/en-us/sql-server/developer-get-started/php-ubuntu
Is anyone else experiencing the same issue?
The latest installable version for me is 4.0.6 and here's the part from pecl output
The text was updated successfully, but these errors were encountered: