尝试从更新管理器或终端安装任何更新或从软件中心或终端安装包时,我收到此错误。有人能帮我解决这个问题吗?我尝试将 .dat 文件移动到另一个目标。甚至将 .onfig 文件复制到可用模式。但无法解决这个问题。
root@krutarth-Vostro-270s:/home/krutarth# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
gir1.2-ubuntuoneui-3.0 libbsd0 linux-headers-3.5.0-23-generic
linux-headers-3.5.0-23 libubuntuoneui-3.0-1
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libapache2-mod-php5 php5-cli php5-common php5-curl php5-gd php5-imap
php5-intl php5-mcrypt php5-mysql php5-pspell php5-readline php5-recode
php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
The following packages will be upgraded:
libapache2-mod-php5 php5-cli php5-common php5-curl php5-gd php5-imap
php5-intl php5-mcrypt php5-mysql php5-pspell php5-readline php5-recode
php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
17 upgraded, 0 newly installed, 0 to remove and 60 not upgraded.
17 not fully installed or removed.
Need to get 0 B/6,003 kB of archives.
After this operation, 4,096 B disk space will be freed.
Do you want to continue [Y/n]? Y
Setting up php5-common (5.4.33-2+deb.sury.org~precise+1) ...
ERROR: pdo module symlink already exists in /etc/php5/conf.d with different content
dpkg: error processing php5-common (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of libapache2-mod-php5:
libapache2-mod-php5 depends on php5-common (= 5.4.33-2+deb.sury.org~precise+1); however:
Package php5-common is not configured yet.
dpkg: error processing libapache2-mod-php5 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5-cli:
php5-cli depends on php5-common (= 5.4.33-2+deb.sury.org~precise+1); however:
Package php5-common is not configured yet.
dpkg: error processing php5-cli (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5-readline:
php5-readline depends on phpapi-20100525; however:
Package phpapi-20100525 is not installed.
Package libapache2-mod-php5 which provides phpapi-20100525 is not configured yet.
Package php5-cli which provides phpapi-20100525 is not configured yet.
php5-readline depends on php5-common (= 5.4.32-2+deb.sury.org~precise+1); however:
Version of php5-coNo apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
mmon on system is 5.4.33-2+deb.sury.org~precise+1.
php5-readline depends on php5-cli (= 5.4.32-2+deb.sury.org~precise+1); however:
Version of php5-cli on system is 5.4.33-2+deb.sury.org~precise+1.
dpkg: error processing php5-readline (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5-intl:
php5-intl depends on phpapi-20100525; however:
Package phpapi-20100525 is not installed.
Package libapache2-mod-php5 which provides phpapi-20100525 is not configured yet.
Package php5-cli which provides phpapi-20100525 is not configured yet.
php5-intl depends on php5-common (= 5.4.32-2+deb.sury.org~precise+1); however:
Version of php5-common on system is 5.4.33-2+deb.sury.org~precise+1.
dpkg: error processing php5-intl (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5-mysql:
php5-mysql depends on phpapi-20100525; however:
Package phpapi-20100525 is not installed.
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
Package libapache2-mod-php5 which provides phpapi-20100525 is not configured yet.
Package php5-cli which provides phpapi-20100525 is not configured yet.
php5-mysql depends on php5-common (= 5.4.32-2+deb.sury.org~precise+1); however:
Version of php5-common on system is 5.4.33-2+deb.sury.org~precise+1.
dpkg: error processing php5-mysql (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5-imap:
php5-imap depends on phpapi-20100525; however:
Package phpapi-20100525 is not installed.
Package libapache2-mod-php5 which provides phpapi-20100525 is not configured yet.
Package php5-cli which provides phpapi-20100525 is not configured yet.
php5-imap depends on php5-common (= 5.4.32-2+deb.sury.org~precise+1); however:
Version of php5-common on system is 5.4.33-2+deb.sury.org~precise+1.
dpkg: error processing php5-imap (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5-xsl:
php5-xsl depends on phpapi-20100525; however:
Package phpapi-20100525 is not installed.
Package libapache2-mod-php5 which provides phpapi-20100525 is not configured yet.
Package php5-cli which provides phpapi-20100525 is not configured yet.
php5-xsl depends on php5-common (= 5.4.32-2+deb.sury.org~precise+1); however:
Version of php5-common on system is 5.4.33-2+deb.sury.org~precise+1.
dpkg: error processing php5-xsl (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5-mcrypt:
php5-mcrypt depends on phpapi-20100525; however:
Package phpapi-20100525 is not installed.
Package libapache2-mod-php5 which provides phpapi-20100525 is not configured yet.
Package php5-cli which provides phpapi-20100525 is not configured yet.
php5-mcrypt depends on php5-common (= 5.4.32-2+deb.sury.org~precise+1); however:
Version of php5-common on system is 5.4.33-2+deb.sury.org~precise+1.
dpkg: error processing php5-mcrypt (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5-pspell:
php5-pspell depends on phpapi-20100525; however:
Package phpapi-20100525 is not installed.
Package libapache2-mod-php5 which provides phpapi-20100525 is not configured yet.
Package php5-cli which provides phpapi-20100525 is not configured yet.
php5-pspell depends on php5-common (= 5.4.32-2+deb.sury.org~precise+1); however:
Version of php5-common on system is 5.4.33-2+deb.sury.org~precise+1.
dpkg: error processing php5-pspell (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5-snmp:
php5-snmp depends on phpapi-20100525; however:
Package phpapi-20100525 is not installed.
Package libapache2-mod-php5 which provides phpapi-20100525 is not configured yet.
Package php5-cli which provides phpapi-20100525 is not configured yet.
php5-snmp depends on php5-common (= 5.4.32-2+deb.sury.org~precise+1); however:
Version of php5-common on system is 5.4.33-2+deb.sury.org~precise+1.
dpkg: error processing php5-snmp (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5-curl:
php5-curl depends on phpapi-20100525; however:
Package phpapi-20100525 is not installed.
Package libapache2-mod-php5 which provides phpapi-20100525 is not configured yet.
Package php5-cli which provides phpapi-20100525 is not configured yet.
php5-curl depends on php5-common (= 5.4.32-2+deb.sury.org~precise+1); however:
Version of php5-common on system is 5.4.33-2+deb.sury.org~precise+1.
dpkg: error processing php5-curl (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5-recode:
php5-recode depends on phpapi-20100525; however:
Package phpapi-20100525 is not installed.
Package libapache2-mod-php5 which provides phpapi-20100525 is not configured yet.
Package php5-cli which provides phpapi-20100525 is not configured yet.
php5-recode depends on php5-common (= 5.4.32-2+deb.sury.org~precise+1); however:
Version of php5-common on system is 5.4.33-2+deb.sury.org~precise+1.
dpkg: error processing php5-recode (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5-xmlrpc:
php5-xmlrpc depends on phpapi-20100525; however:
Package phpapi-20100525 is not installed.
Package libapache2-mod-php5 which provides phpapi-20100525 is not configured yet.
Package php5-cli which provides phpapi-20100525 is not configured yet.
php5-xmlrpc depends on php5-common (= 5.4.32-2+deb.sury.org~precise+1); however:
Version of php5-common on system is 5.4.33-2+deb.sury.org~precise+1.
dpkg: error processing php5-xmlrpc (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5-sqlite:
php5-sqlite depends on phpapi-20100525; however:
Package phpapi-20100525 is not installed.
Package libapache2-mod-php5 which provides phpapi-20100525 is not configured yet.
Package php5-cli which provides phpapi-20100525 is not configured yet.
php5-sqlite depends on php5-common (= 5.4.32-2+deb.sury.org~precise+1); however:
Version of php5-common on system is 5.4.33-2+deb.sury.org~precise+1.
dpkg: error processing php5-sqlite (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5-gd:
php5-gd depends on phpapi-20100525; however:
Package phpapi-20100525 is not installed.
Package libapache2-mod-php5 which provides phpapi-20100525 is not configured yet.
Package php5-cli which provides phpapi-20100525 is not configured yet.
php5-gd depends on php5-common (= 5.4.32-2+deb.sury.org~precise+1); however:
Version of php5-common on system is 5.4.33-2+deb.sury.org~precise+1.
dpkg: error processing php5-gd (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5-tidy:
php5-tidy depends on phpapi-20100525; however:
Package phpapi-20100525 is not installed.
Package libapache2-mod-php5 which provides phpapi-20100525 is not configured yet.
Package php5-cli which provides phpapi-20100525 is not configured yet.
php5-tidy depends on php5-common (= 5.4.32-2+deb.sury.org~precise+1); however:
Version of php5-common on system is 5.4.33-2+deb.sury.org~precise+1.
dpkg: error processing php5-tidy (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
php5-common
libapache2-mod-php5
php5-cli
php5-readline
php5-intl
php5-mysql
php5-imap
php5-xsl
php5-mcrypt
php5-pspell
php5-snmp
php5-curl
php5-recode
php5-xmlrpc
php5-sqlite
php5-gd
php5-tidy
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
第一个问题始于 php5-common 和 pdo 模块:
Setting up php5-common (5.4.33-2+deb.sury.org~precise+1) ...
ERROR: pdo module symlink already exists in /etc/php5/conf.d with different content
因此我建议先删除 pdo 文件并重新安装 php5-common。
- 备份
/var/lib/dpkg/status
只是为了确保cp /var/lib/dpkg/status /var/lib/dpkg/status.backup
php5-common
使用/var/lib/dpkg/status
文本编辑器(例如 nano 或 vi)删除所有条目。pdo
备份并删除当前sudo mv /etc/php5/conf.d/10-pdo.ini /etc/php5/conf.d/10-pdo.ini.backup
apt-get install php5-common
安装完成后php5-common
您就可以apt-get -f install
毫无问题地使用了。