pdo_mysql.so: undefined symbol: pdo_parse_params in Unknown on line 0

来源:互联网 发布:淘宝怎么添加花呗支付 编辑:程序博客网 时间:2024/05/16 01:25

     我在使用yii2搭建网站的时候,打开该网站时,经常会出现以下警告:


PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212/pdo_mysql.so' - /usr/lib/php5/20121212/pdo_mysql.so: undefined symbol: pdo_parse_params in Unknown on line 0


     解决方法: 

     remove and purge the php5-common package. 即移除并合并php5-common的安装包。

    但是你在进行上述操作时,其他的包也会被移除掉,所以要把移除php5-common时,相应被移除地包记下来,待会重新安装。

    注意:以下命令将会删除所有php5的相关配置文件。

         apt-get --purge remove php5-common

    然后把移除 php5-common 时移除地相关包重新下载安装。

         apt-get install php5-common etc.

    例子:

   

root@jupiter:~# apt-get --purge remove php5-commonReading package lists... DoneBuilding dependency treeReading state information... DoneThe following packages were automatically installed and are no longer required:  libc-client2007e libmcrypt4 libonig2 libqdbm14 mlockUse 'apt-get autoremove' to remove them.The following packages will be REMOVED:  libapache2-mod-php5* libphp-adodb* php-auth-sasl* php-net-smtp* php-net-socket* php-pear* php5* php5-cgi* php5-cli* php5-common* php5-curl* php5-ffmpeg* php5-gd* php5-geoip* php5-imap*  php5-mcrypt* php5-memcache* php5-mysql* php5-pspell* php5-xcache*0 upgraded, 0 newly installed, 20 to remove and 0 not upgraded.After this operation, 41.7 MB disk space will be freed.Do you want to continue [Y/n]?(Reading database ... 60054 files and directories currently installed.)Removing libphp-adodb ...Purging configuration files for libphp-adodb ...Removing php5 ...Removing libapache2-mod-php5 ...Module php5 disabled.To activate the new configuration, you need to run:  service apache2 restartPurging configuration files for libapache2-mod-php5 ...dpkg: warning: while removing libapache2-mod-php5, directory '/etc/php5/apache2' not empty so not removedRemoving php-auth-sasl ...Removing php-net-smtp ...Removing php-net-socket ...Removing php-pear ...Purging configuration files for php-pear ...Removing php5-cgi ...ERROR: Module php5_cgi does not exist!Purging configuration files for php5-cgi ...dpkg: warning: while removing php5-cgi, directory '/etc/php5/cgi' not empty so not removedRemoving php5-pspell ...WARNING: pspell module does not exist!Purging configuration files for php5-pspell ...Removing php5-mysql ...Purging configuration files for php5-mysql ...Removing php5-mcrypt ...WARNING: mcrypt module does not exist!Purging configuration files for php5-mcrypt ...Removing php5-imap ...WARNING: imap module does not exist!Purging configuration files for php5-imap ...Removing php5-gd ...WARNING: gd module does not exist!Purging configuration files for php5-gd ...Removing php5-curl ...WARNING: curl module does not exist!Purging configuration files for php5-curl ...Removing php5-xcache ...WARNING: xcache module does not exist!Purging configuration files for php5-xcache ...Removing php5-memcache ...WARNING: memcache module does not exist!Purging configuration files for php5-memcache ...Removing php5-geoip ...Purging configuration files for php5-geoip ...Removing php5-ffmpeg ...WARNING: ffmpeg module does not exist!Purging configuration files for php5-ffmpeg ...Removing php5-cli ...Purging configuration files for php5-cli ...Removing php5-common ...WARNING: pdo module does not exist!Purging configuration files for php5-common ...dpkg: warning: while removing php5-common, directory '/etc/php5/conf.d' not empty so not removedProcessing triggers for man-db ...
root@jupiter:~# apt-get install libapache2-mod-php5 libphp-adodb php-auth-sasl php-net-smtp php-net-socket php-pear php5 php5-cgi php5-cli php5-common php5-curl php5-ffmpeg php5-gd php5-geoip php5-imap php5-mcrypt php5-memcache php5-mysql php5-pspell php5-xcache libc-client2007e libmcrypt4 libonig2 libqdbm14 mlockReading package lists... DoneBuilding dependency treeReading state information... Donelibmcrypt4 is already the newest version.libmcrypt4 set to manually installed.libonig2 is already the newest version.libonig2 set to manually installed.libqdbm14 is already the newest version.libqdbm14 set to manually installed.libc-client2007e is already the newest version.libc-client2007e set to manually installed.mlock is already the newest version.mlock set to manually installed.Suggested packages:  php5-adodb php5-devThe following NEW packages will be installed:  libapache2-mod-php5 libphp-adodb php-auth-sasl php-net-smtp php-net-socket php-pear php5 php5-cgi php5-cli php5-common php5-curl php5-ffmpeg php5-gd php5-geoip php5-imap php5-mcrypt  php5-memcache php5-mysql php5-pspell php5-xcache0 upgraded, 20 newly installed, 0 to remove and 0 not upgraded.Need to get 804 kB/12.5 MB of archives.After this operation, 41.7 MB of additional disk space will be used.Do you want to continue [Y/n]? yGet:1 http://ftp.us.debian.org/debian/ wheezy/main php-net-socket all 1.0.9-2 [9,068 B]Get:2 http://ftp.us.debian.org/debian/ wheezy/main php-net-smtp all 1.6.1-1 [22.7 kB]Get:3 http://ftp.us.debian.org/debian/ wheezy/main php5-xcache amd64 2.0.0-4 [112 kB]Get:4 http://ftp.us.debian.org/debian/ wheezy/main libphp-adodb all 5.15-1 [567 kB]Get:5 http://ftp.us.debian.org/debian/ wheezy/main php-auth-sasl all 1.0.4-1 [9,530 B]Get:6 http://ftp.us.debian.org/debian/ wheezy/main php5-ffmpeg amd64 0.6.0-2.2 [23.9 kB]Get:7 http://ftp.us.debian.org/debian/ wheezy/main php5-memcache amd64 3.0.6-6 [60.6 kB]Fetched 804 kB in 2s (295 kB/s)Preconfiguring packages ...Selecting previously unselected package php5-common.(Reading database ... 59432 files and directories currently installed.)Unpacking php5-common (from .../php5-common_5.4.41-0+deb7u1_amd64.deb) ...Selecting previously unselected package php5-cli.Unpacking php5-cli (from .../php5-cli_5.4.41-0+deb7u1_amd64.deb) ...Selecting previously unselected package php-pear.Unpacking php-pear (from .../php-pear_5.4.41-0+deb7u1_all.deb) ...Selecting previously unselected package php-net-socket.Unpacking php-net-socket (from .../php-net-socket_1.0.9-2_all.deb) ...Processing triggers for man-db ...Setting up php5-common (5.4.41-0+deb7u1) ...Creating config file /etc/php5/mods-available/pdo.ini with new versionSetting up php5-cli (5.4.41-0+deb7u1) ...Creating config file /etc/php5/cli/php.ini with new versionupdate-alternatives: using /usr/bin/php5 to provide /usr/bin/php (php) in auto modeSetting up php-pear (5.4.41-0+deb7u1) ...Selecting previously unselected package php-net-smtp.(Reading database ... 59677 files and directories currently installed.)Unpacking php-net-smtp (from .../php-net-smtp_1.6.1-1_all.deb) ...Selecting previously unselected package php5-cgi.Unpacking php5-cgi (from .../php5-cgi_5.4.41-0+deb7u1_amd64.deb) ...Selecting previously unselected package libapache2-mod-php5.Unpacking libapache2-mod-php5 (from .../libapache2-mod-php5_5.4.41-0+deb7u1_amd64.deb) ...Selecting previously unselected package php5-curl.Unpacking php5-curl (from .../php5-curl_5.4.41-0+deb7u1_amd64.deb) ...Selecting previously unselected package php5-gd.Unpacking php5-gd (from .../php5-gd_5.4.41-0+deb7u1_amd64.deb) ...Selecting previously unselected package php5-imap.Unpacking php5-imap (from .../php5-imap_5.4.41-0+deb7u1_amd64.deb) ...Selecting previously unselected package php5-mcrypt.Unpacking php5-mcrypt (from .../php5-mcrypt_5.4.41-0+deb7u1_amd64.deb) ...Selecting previously unselected package php5-mysql.Unpacking php5-mysql (from .../php5-mysql_5.4.41-0+deb7u1_amd64.deb) ...Selecting previously unselected package php5-pspell.Unpacking php5-pspell (from .../php5-pspell_5.4.41-0+deb7u1_amd64.deb) ...Selecting previously unselected package php5-xcache.Unpacking php5-xcache (from .../php5-xcache_2.0.0-4_amd64.deb) ...Selecting previously unselected package php5.Unpacking php5 (from .../php5_5.4.41-0+deb7u1_all.deb) ...Selecting previously unselected package libphp-adodb.Unpacking libphp-adodb (from .../libphp-adodb_5.15-1_all.deb) ...Selecting previously unselected package php-auth-sasl.Unpacking php-auth-sasl (from .../php-auth-sasl_1.0.4-1_all.deb) ...Selecting previously unselected package php5-ffmpeg.Unpacking php5-ffmpeg (from .../php5-ffmpeg_0.6.0-2.2_amd64.deb) ...Selecting previously unselected package php5-geoip.Unpacking php5-geoip (from .../php5-geoip_1.0.7-8_amd64.deb) ...Selecting previously unselected package php5-memcache.Unpacking php5-memcache (from .../php5-memcache_3.0.6-6_amd64.deb) ...Processing triggers for man-db ...Setting up php-net-socket (1.0.9-2) ...Setting up php-net-smtp (1.6.1-1) ...Setting up php5-cgi (5.4.41-0+deb7u1) ...Creating config file /etc/php5/cgi/php.ini with new versionupdate-alternatives: using /usr/bin/php5-cgi to provide /usr/bin/php-cgi (php-cgi) in auto modeupdate-alternatives: using /usr/lib/cgi-bin/php5 to provide /usr/lib/cgi-bin/php (php-cgi-bin) in auto modeSetting up libapache2-mod-php5 (5.4.41-0+deb7u1) ...Creating config file /etc/php5/apache2/php.ini with new version[ ok ] Restarting web server: apache2.Setting up php5-curl (5.4.41-0+deb7u1) ...Creating config file /etc/php5/mods-available/curl.ini with new versionSetting up php5-gd (5.4.41-0+deb7u1) ...Creating config file /etc/php5/mods-available/gd.ini with new versionSetting up php5-imap (5.4.41-0+deb7u1) ...Creating config file /etc/php5/mods-available/imap.ini with new versionSetting up php5-mcrypt (5.4.41-0+deb7u1) ...Creating config file /etc/php5/mods-available/mcrypt.ini with new versionSetting up php5-mysql (5.4.41-0+deb7u1) ...Creating config file /etc/php5/mods-available/mysql.ini with new versionCreating config file /etc/php5/mods-available/mysqli.ini with new versionCreating config file /etc/php5/mods-available/pdo_mysql.ini with new versionSetting up php5-pspell (5.4.41-0+deb7u1) ...Creating config file /etc/php5/mods-available/pspell.ini with new versionSetting up php5-xcache (2.0.0-4) ...Setting up php5 (5.4.41-0+deb7u1) ...Setting up libphp-adodb (5.15-1) ...Setting up php-auth-sasl (1.0.4-1) ...Setting up php5-ffmpeg (0.6.0-2.2) ...Setting up php5-geoip (1.0.7-8) ...Setting up php5-memcache (3.0.6-6) ...Processing triggers for libapache2-mod-php5 ...[ ok ] Reloading web server config: apache2.


1 0
原创粉丝点击