我已经有一个月左右的时间遇到这个问题,它让我陷入困境,如果这个问题有一个简单的解决方案,请原谅我。我已经尝试了几乎所有可能的解决方案。
我无法打开软件和更新,也无法使用:
sudo apt-get remove software-center
这再次告诉我们使用
sudo apt-get -f install
我想安装 brew (以更新 dart),因此我尝试了这个命令:
$ sudo apt install linuxbrew-wrapper
sudo: unable to resolve host ice
Reading package lists... Done
Building dependency tree
Reading state information... Done
linuxbrew-wrapper is already the newest version (20150804-3).
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
python3-magic : Depends: libmagic1 (< 1:5.25-2ubuntu1.1~) but 1:5.25-2ubuntu1.1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
$ sudo apt-get -f install
sudo: unable to resolve host ice
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:
libcuda1-375 libllvm4.0 libx265-130 linux-headers-4.10.0-35
linux-headers-4.10.0-35-generic linux-headers-4.10.0-37
linux-headers-4.10.0-37-generic linux-headers-4.13.0-37
linux-headers-4.13.0-37-generic linux-image-4.10.0-35-generic
linux-image-4.10.0-37-generic linux-image-4.13.0-37-generic
linux-image-extra-4.10.0-35-generic linux-image-extra-4.10.0-37-generic
linux-image-extra-4.13.0-37-generic linux-signed-image-4.10.0-35-generic
linux-signed-image-4.10.0-37-generic linux-signed-image-4.13.0-37-generic
nvidia-opencl-icd-375
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
python3-louis python3-magic
The following packages will be upgraded:
python3-louis python3-magic
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
107 not fully installed or removed.
Need to get 0 B/12.8 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 370948 files and directories currently installed.)
Preparing to unpack .../python3-magic_1%3a5.25-2ubuntu1.1_all.deb ...
/var/lib/dpkg/info/python3-magic.prerm: 6: /var/lib/dpkg/info/python3-magic.prerm: py3clean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not found
dpkg: error processing archive /var/cache/apt/archives/python3-magic_1%3a5.25-2ubuntu1.1_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/python3-magic.postinst: 6: /var/lib/dpkg/info/python3-magic.postinst: py3compile: not found
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 127
Preparing to unpack .../python3-louis_2.6.4-2ubuntu0.3_all.deb ...
/var/lib/dpkg/info/python3-louis.prerm: 6: /var/lib/dpkg/info/python3-louis.prerm: py3clean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not found
dpkg: error processing archive /var/cache/apt/archives/python3-louis_2.6.4-2ubuntu0.3_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/python3-louis.postinst: 6: /var/lib/dpkg/info/python3-louis.postinst: py3compile: not found
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
/var/cache/apt/archives/python3-magic_1%3a5.25-2ubuntu1.1_all.deb
/var/cache/apt/archives/python3-louis_2.6.4-2ubuntu0.3_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
$ sudo apt autoremove
sudo: unable to resolve host ice
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:
python3-magic : Depends: libmagic1 (< 1:5.25-2ubuntu1.1~) but 1:5.25-2ubuntu1.1 is installed
E: Unmet dependencies. Try using -f.
几乎每次安装软件都会出现同样的错误。所以我对此无能为力。
$ sudo apt update
sudo: unable to resolve host ice
Hit:1 https://repo.skype.com/deb stable InRelease
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:3 http://ppa.launchpad.net/jonathonf/ffmpeg-3/ubuntu xenial InRelease
Get:4 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Hit:5 http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu xenial InRelease
Hit:6 http://archive.canonical.com/ubuntu xenial InRelease
Hit:7 ppa.launchpad.net/nathan-renniewaldock/flux/ubuntu xenial InRelease
Get:8 archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB])
Hit:9 ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease )
Get:10 archive.ubuntu.com/ubuntu xenial-security InRelease [107 kB])
Fetched 323 kB in 1s (165 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.
$ sudo apt list --upgradable
sudo: unable to resolve host ice
Listing... Done
python3-louis/xenial-updates,xenial-updates,xenial-security,xenial-security 2.6.4-2ubuntu0.3 all [upgradable from: 2.6.4-2ubuntu0.1]
python3-magic/xenial-updates,xenial-updates,xenial-security,xenial-security 1:5.25-2ubuntu1.1 all [upgradable from: 1:5.25-2ubuntu1]
sudo apt dist-upgrade
也解决不了问题。
此外,我的屏幕上已经出现这个警告大约一个月了,我该如何处理?