我有一个安装了Ubuntu 16.04的Linux服务器,仅用于LAMPP环境。我已经安装了PHP 5.6(在Apache和CLI中),因为项目与PHP7不兼容,所以必须保留5.6版本。我正试图从CLI运行一个PHP脚本,但却得到错误提示:curl_init()在未知函数中。于是,我打开了php.ini文件(CLI的那个),禁用了该扩展,在CLI中运行php --version
时,我得到:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20131226/php_curl.dll' - /usr/lib/php/20131226/php_curl.dll: cannot open shared object file: No such file or directory in Unknown on line 0
然后我尝试使用以下命令安装 curl:sudo apt-get install php5-curl
,但是遇到了以下错误:
E: Unable to locate package php5-curl
那么,我该怎么办呢?我该如何安装它呢?谢谢。
curl --help
,它已经安装好了。所以我开始相信我必须替换dll所在的目录,但我不知道如何找到当前位置。 - Sredny M Casanova