无法安装 php5-mysql

无法安装 php5-mysql
Setting up php5-mysql (5.5.9+dfsg-1ubuntu4.14) ...

Creating config file /etc/php5/mods-available/mysql.ini with new version
cp: cannot create regular file ‘/etc/php5/mods-available/mysql.ini’: No such file or directory
dpkg: error processing package php5-mysql (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for libapache2-mod-php5 (5.5.9+dfsg-1ubuntu4.14) ...
Errors were encountered while processing:
 php5-mysql
E: Sub-process /usr/bin/dpkg returned an error code (1)

跑步sudo apt-get checksudo apt-get -f install

saroj@box:~$ sudo apt-get check
Reading package lists... Done
Building dependency tree       
Reading state information... Done
saroj@box:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  dbconfig-common libjs-codemirror libjs-jquery-cookie libjs-jquery-event-drag
  libjs-jquery-metadata libjs-jquery-mousewheel libjs-jquery-tablesorter
  libjs-jquery-ui libjs-underscore php-gettext
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up php5-mysql (5.5.9+dfsg-1ubuntu4.14) ...

Creating config file /etc/php5/mods-available/mysql.ini with new version
cp: cannot create regular file ‘/etc/php5/mods-available/mysql.ini’: No such file or directory
dpkg: error processing package php5-mysql (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for libapache2-mod-php5 (5.5.9+dfsg-1ubuntu4.14) ...
Errors were encountered while processing:
 php5-mysql
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

首先删除包,正如@Parto 所说:sudo apt-get remove --purge php5-common php5-cli php5-gd php5-mysql

sudo dpkg --configure -a

sudo apt-get install -f

相关内容