在Mac上执行以下操作后,谁能帮助我解决找不到库的问题:sudo pecl install sqlsrv
我正在尝试在Mac OS上为PHP安装sql驱动程序。 非常感谢您的帮助。
这是“ sudo pecl install sqlsrv”的输出。
....
g++ -std=c++11 -I. -I/Users/citrakamah/Downloads/pear/temp/sqlsrv -DPHP_ATOM_INC -I/Users/citrakamah/Downloads/pear/temp/pear-build-rooto5Oab3/sqlsrv-5.3.0/include -I/Users/citrakamah/Downloads/pear/temp/pear-build-rooto5Oab3/sqlsrv-5.3.0/main -I/Users/citrakamah/Downloads/pear/temp/sqlsrv -I/usr/local/Cellar/php/7.2.9_2/include/php -I/usr/local/Cellar/php/7.2.9_2/include/php/main -I/usr/local/Cellar/php/7.2.9_2/include/php/TSRM -I/usr/local/Cellar/php/7.2.9_2/include/php/Zend -I/usr/local/Cellar/php/7.2.9_2/include/php/ext -I/usr/local/Cellar/php/7.2.9_2/include/php/ext/date/lib -I/Users/citrakamah/Downloads/pear/temp/sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -D_FORTIFY_SOURCE=2 -O2 -fstack-protector -c /Users/citrakamah/Downloads/pear/temp/sqlsrv/shared/StringFunctions.cpp -fno-common -DPIC -o shared/.libs/StringFunctions.o
/bin/sh /Users/citrakamah/Downloads/pear/temp/pear-build-rooto5Oab3/sqlsrv-5.3.0/libtool --mode=link cc -DPHP_ATOM_INC -I/Users/citrakamah/Downloads/pear/temp/pear-build-rooto5Oab3/sqlsrv-5.3.0/include -I/Users/citrakamah/Downloads/pear/temp/pear-build-rooto5Oab3/sqlsrv-5.3.0/main -I/Users/citrakamah/Downloads/pear/temp/sqlsrv -I/usr/local/Cellar/php/7.2.9_2/include/php -I/usr/local/Cellar/php/7.2.9_2/include/php/main -I/usr/local/Cellar/php/7.2.9_2/include/php/TSRM -I/usr/local/Cellar/php/7.2.9_2/include/php/Zend -I/usr/local/Cellar/php/7.2.9_2/include/php/ext -I/usr/local/Cellar/php/7.2.9_2/include/php/ext/date/lib -I/Users/citrakamah/Downloads/pear/temp/sqlsrv/shared/ -DHAVE_CONFIG_H -g -O2 -o sqlsrv.la -export-dynamic -avoid-version -prefer-pic -module -rpath /Users/citrakamah/Downloads/pear/temp/pear-build-rooto5Oab3/sqlsrv-5.3.0/modules conn.lo util.lo init.lo stmt.lo shared/core_conn.lo shared/core_results.lo shared/core_stream.lo shared/core_init.lo shared/core_stmt.lo shared/core_util.lo shared
/FormattedPrint.lo shared/localizationimpl.lo shared/StringFunctions.lo -Wl,-bind_at_load -lstdc++ -lodbc -lodbcinst
cc ${wl}-undefined ${wl}dynamic_lookup -o .libs/sqlsrv.so -bundle .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 -Wl,-bind_at_load
ld: library not found for -lodbc
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [sqlsrv.la] Error 1
ERROR: `make' failed