我正在尝试修复几乎已满的启动分区,但似乎无法运行任何 apt-get 操作。不确定如何解决这种混乱的情况。
# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
libssl-dev : Depends: libssl1.0.0 (= 1.0.1-4ubuntu5.14) but 1.0.1-4ubuntu5.17 is installed
E: Unmet dependencies. Try using -f.
#
# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
libssl-dev
The following packages will be upgraded:
libssl-dev
1 upgraded, 0 newly installed, 0 to remove and 111 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,574 kB of archives.
After this operation, 1,024 B of additional disk space will be used.
Do you want to continue [Y/n]?
dpkg: dependency problems prevent configuration of libssl-dev:
libssl-dev depends on libssl1.0.0 (= 1.0.1-4ubuntu5.14); however:
Version of libssl1.0.0 on system is 1.0.1-4ubuntu5.17.
dpkg: error processing libssl-dev (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
libssl-dev
E: Sub-process /usr/bin/dpkg returned an error code (1)
#
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/DRAGONITE-root 61G 3.7G 55G 7% /
udev 993M 12K 993M 1% /dev
tmpfs 201M 296K 201M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1002M 0 1002M 0% /run/shm
/dev/vda1 228M 163M 53M 76% /boot
#
# apt-get -f autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
libssl-dev
The following packages will be upgraded:
libssl-dev
1 upgraded, 0 newly installed, 0 to remove and 111 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,574 kB of archives.
After this operation, 1,024 B of additional disk space will be used.
Do you want to continue [Y/n]?
dpkg: dependency problems prevent configuration of libssl-dev:
libssl-dev depends on libssl1.0.0 (= 1.0.1-4ubuntu5.14); however:
Version of libssl1.0.0 on system is 1.0.1-4ubuntu5.17.
dpkg: error processing libssl-dev (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
libssl-dev
E: Sub-process /usr/bin/dpkg returned an error code (1)
更新:
运行以下命令,出现错误:
# sudo apt-get purge libssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
php5-dev : Depends: libssl-dev but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
答案1
运行以下命令来修复该问题:
sudo apt-get update
sudo apt-get purge libssl-dev
记下要卸载的软件包。如果输出列出了 13 个要卸载的软件包,则可以使用以下命令重新安装所有内容。否则,请逐行复制并粘贴此命令后的内容以重新安装所有内容。
sudo apt-get install --reinstall libroot-core-dev libssl1.0.0 libssl-dev
再次,该命令将重新安装所有 13 个包。
我不知道你的情况,但运行以下命令可能是明智的:
sudo apt-get dist-upgrade
然而,此命令会对您的系统做出更改,因此您应该避免使用该命令,直到完成任何可能受系统更改影响的重要项目!