我正在尝试在Ubuntu 16上安装composer。
curl -sS https://getcomposer.org/installer | php
并收到警告:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_soap.dll' - /usr/lib/php/20151012/php_soap.dll: cannot open shared object file: No such file or directory in Unknown on line 0
All settings correct for using Composer
Downloading 1.2.0...
Composer successfully installed to: //composer.phar
Use it: php composer.phar
我使用以下肥皂:
sudo apt-get install php-soap
在/usr/lib/php/20151012/php_soap.dll
目录中的确实没有这样的电子文件
在php -i | grep -i soap
之后:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_soap.dll' - /usr/lib/php/20151012/php_soap.dll: cannot open shared object file: No such file or directory in Unknown on line 0
/etc/php/7.0/cli/conf.d/20-soap.ini,
soap
Soap Client => enabled
Soap Server => enabled
soap.wsdl_cache => 1 => 1
soap.wsdl_cache_dir => /tmp => /tmp
soap.wsdl_cache_enabled => 1 => 1
soap.wsdl_cache_limit => 5 => 5
soap.wsdl_cache_ttl => 86400 => 86400
如何解决php_soap.dll
的问题?
答案 0 :(得分:9)
首先尝试使用以下命令
搜索提到的.dll文件的位置grep -r "soap.dll" /etc/php/7.0/cli/
如果您从命令中获得任何匹配项,请在它们之前搜索;
。如果他们没有,请打开文件并注释e。
nano /etc/php/7.0/cli/php.ini
然后按 ctrl + W 调用搜索,然后粘贴您要搜索的字符串,在本例中为soap.dll
,您应该到达那个字符串的行。在它前面放一个; 并用 ctrl + X 保存文件,然后是 Y 和输入
尝试运行php -i | grep -i soap
并查看是否仍有错误。
答案 1 :(得分:0)
运行这两个命令
sudo apt-get update
sudo apt-get upgrade
它将解决php软件包问题。