在Ubuntu 16中缺少php_soap.dll

时间:2016-08-25 22:06:25

标签: php linux ubuntu soap composer-php

我正在尝试在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的问题?

2 个答案:

答案 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软件包问题。