简体   繁体   中英

PHP Startup: Unable to load dynamic library 'smbclient.so'

I updated Ubunto 18 to Ubuntu 20

now when I run a composer I get Warning messages

$ composer

PHP Warning:  PHP Startup: Unable to load dynamic library 'smbclient.so' (tried: /usr/lib/php/20200930/smbclient.so (/usr/lib/php/20200930/smbclient.so: undefined symbol: smbc_setOptionProtocols, version SMBCLIENT_0.2.3), /usr/lib/php/20200930/smbclient.so.so (/usr/lib/php/20200930/smbclient.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'smbclient.so' (tried: /usr/lib/php/20200930/smbclient.so (/usr/lib/php/20200930/smbclient.so: undefined symbol: smbc_setOptionProtocols, version SMBCLIENT_0.2.3), /usr/lib/php/20200930/smbclient.so.so (/usr/lib/php/20200930/smbclient.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Please help me understand it and fix it

I looked for what I have

$ apt list --installed | grep -i smb

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libsmbclient/focal-updates,now 2:4.13.17~dfsg-0ubuntu0.21.04.2 amd64 [installed]
libsmbios-c2/focal,now 2.4.3-1 amd64 [installed,automatic]
php8.0-smbclient/now 1.0.6-6+ubuntu18.04.1+deb.sury.org+10 amd64 [installed,local]
smbclient/focal-updates,now 2:4.13.17~dfsg-0ubuntu0.21.04.2 amd64 [installed]

and removed some

$ sudo apt-get remove smbclient/focal-updates
$ sudo apt-get remove php8.0-smbclient
$ sudo apt-get remove libsmbclient/focal-updates
$ sudo apt autoremove

so I only left with this

libsmbios-c2/focal,now 2.4.3-1 amd64 [installed,automatic]

The warnings have gone now

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM