我因以下错误而遇到麻烦:
click-system-hooks.service couldn't start.
Errors were encountered while processing: /var/cache/apt/archives/click_0.4.38.5ubuntu0.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
它还显示以下消息:
如何解决?
我努力了:
$ sudo dpkg --configure -a
$ sudo apt-get install systemd
输出为:
Reading package lists... Done
Building dependency tree
Reading state information... Done
systemd is already the newest version.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
click : Depends: python3-click (= 0.4.38.5) but 0.4.38.5ubuntu0.2 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
我尝试sudo 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:
at bzr-builddeb debian-archive-keyring devscripts distro-info
distro-info-data dput libdistro-info-perl
libexporter-lite-perl libio-stringy-perl
libparse-debcontrol-perl libtie-ixhash-perl libxdelta2
pbuilder pbzip2 pristine-tar pybootchartgui python-debianbts
python-defusedxml python-distro-info python-lzma
python-reportbug python-requests python-soappy
python-ubuntutools python-wstools quilt reportbug
ubuntu-dev-tools xdelta
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
click
Suggested packages:
ubuntu-app-launch-tools upstart-app-launch-tools
The following packages will be upgraded:
click
1 upgraded, 0 newly installed, 0 to remove and 38 not upgraded.
Need to get 0 B/14.4 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 ... 560681 files and directories currently installed.)
Preparing to unpack .../click_0.4.38.5ubuntu0.2_amd64.deb ...
Please enter passphrase for disk Samsung_SSD_850_EVO_120GB (var)! ********************
Please enter passphrase for disk Samsung_SSD_850_EVO_120GB (cryptswap1)!
Broadcast message from root@....... (Fri 2015-10-23 23:03:00 ICT):
Password entry required for 'Please enter passphrase for disk Samsung_SSD_850_EVO_120GB (cryptswap1)!' (PID 11194).
Please enter password with the systemd-tty-ask-password-agent tool!
**********
Traceback (most recent call last):
File "/usr/bin/click", line 31, in <module
from click import commands
ImportError: cannot import name 'commands'
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Traceback (most recent call last):
File "/usr/bin/click", line 31, in <module
from click import commands
ImportError: cannot import name 'commands'
dpkg: error processing archive /var/cache/apt/archives/click_0.4.38.5ubuntu0.2_amd64.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
Broadcast message from root@........(Fri 2015-10-23 23:03:05 ICT):
Password entry required for 'Please enter passphrase for disk Samsung_SSD_850_EVO_120GB (var)!' (PID 13188).
Please enter password with the systemd-tty-ask-password-agent tool!
Broadcast message from root@......... (Fri 2015-10-23 23:03:05 ICT):
Password entry required for 'Please enter passphrase for disk Samsung_SSD_850_EVO_120GB (cryptswap1)!' (PID 13187).
Please enter password with the systemd-tty-ask-password-agent tool!
Broadcast message from root@......... (Fri 2015-10-23 23:03:05 ICT):
Password entry required for 'Please enter passphrase for disk Samsung_SSD_850_EVO_120GB (var)!' (PID 13188).
Please enter password with the systemd-tty-ask-password-agent tool!
Please enter passphrase for disk Samsung_SSD_850_EVO_120GB (cryptswap1)! Job for click-system-hooks.service failed. See "systemctl status click-system-hooks.service" and "journalctl -xe" for details.
*****************
Broadcast message from root@........... (Fri 2015-10-23 23:03:10 ICT):
Password entry required for 'Please enter passphrase for disk Samsung_SSD_850_EVO_120GB (var)!' (PID 13188).
Please enter password with the systemd-tty-ask-password-agent tool!
Please enter passphrase for disk Samsung_SSD_850_EVO_120GB (var)! ******************
click-system-hooks.service couldn't start.
Errors were encountered while processing:
/var/cache/apt/archives/click_0.4.38.5ubuntu0.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
答案2
你的click
问题
click
Vivid 有版本0.4.38.5ubuntu0.2
,需要完全相同的python3-click
版本。两者都在存储库中。
删除 DEB 文件
sudo apt-get clean
更新包信息
sudo apt-get update
重新安装
click
sudo apt-get install --reinstall click
你的ttf-mscorefonts-installer
安装包
ttf-mscorefonts-installer
,我们需要包中的一些东西sudo apt-get install --reinstall ttf-mscorefonts-installer
下载并安装字体
TMP=$(mktemp -d) cd "$TMP" awk '/Url/ {system("wget "$2)}' /usr/share/package-data-downloads/ttf-mscorefonts-installer sudo /usr/lib/msttcorefonts/update-ms-fonts "$TMP"/*
避免将来出现错误消息
sudo touch /var/lib/update-notifier/package-data-downloads/ttf-mscorefonts-installer
家政
cd .. rm -r "$TMP"