我已经将我的 ubuntu 升级到 18.04,现在我想念我的 curl.so。
通常它会在这里 /usr/lib/php/20160501/curl.so 但它不见了。
在命令行上,我可以使用 curl,但不能在我的 php 代码中使用。
php -m | grep curl 导致
PHP警告:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/curl.so' - /usr/lib/php/20160303/curl.so: cannot open shared object file: No such file or directory in Unknown on line 0
Run Code Online (Sandbox Code Playgroud)
一个快速的解决方法是将“a” curl.so 放在该文件夹中,但我从哪里获得 curl.so?
我试图用 apt install php-curl 重新安装它,但这给了我
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php-curl : Depends: php7.2-curl but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)
我仍在使用 ppa:ondrej/php。
当我检查/var/lib/php/7.1/enabled_by_admin
curl 被列出。
在我的/etc/php/7.1/cli/mods_available
curl.ini 中有。
在我/etc/php/7.1/cli/conf.d
的那个ini的符号链接也在那里。
wget https://curl.haxx.se/download/curl-7.59.0.tar.gz
cd curl-7.59.o
./configure
make
sudo make install
Run Code Online (Sandbox Code Playgroud)
也没有帮助。
首先我新添加了ppa并重新安装了php7.1
须藤 apt-add-repository ppa:ondrej/php sudo apt-get 更新 sudo apt 安装 php7.1
比我安装的php7.1-curl
还要好,瞧,一切又都完美无缺了。
问题是我得到了旧的 ppa 版本。
归档时间: |
|
查看次数: |
6533 次 |
最近记录: |