在我上次apt-get升级后,我注意到TensorFlow停止了工作。我试图再次更新所有软件,现在我的apt-get抱怨这个"点击"模块。
% sudo apt-get install -f !9045
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
click
Suggested packages:
click-reviewers-tools ubuntu-app-launch-tools | upstart-app-launch-tools
The following packages will be upgraded:
click
1 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
Need to get 0 B/14,5 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 ... 482732 files and directories currently installed.)
Preparing to unpack .../click_0.4.43+16.04.20170613-0ubuntu1_amd64.deb ...
Traceback (most recent call last):
File "/usr/bin/click", line 37, in <module>
import click
ImportError: No module named 'click'
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 37, in <module>
import click
ImportError: No module named 'click'
dpkg: error processing archive /var/cache/apt/archives/click_0.4.43+16.04.20170613-0ubuntu1_amd64.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
Job for click-system-hooks.service failed because the control process exited with error code. See "systemctl status click-system-hooks.service" and "journalctl -xe" for details.
click-system-hooks.service couldn't start.
Errors were encountered while processing:
/var/cache/apt/archives/click_0.4.43+16.04.20170613-0ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我无法安装任何软件包,因为它会卡在那里。
这是Ubuntu 16.10
答案 0 :(得分:0)
您是否尝试过使用PIP而不是Apt进行安装?如果没有,请执行以下操作:
sudo apt install python-pip
pip install click
或sudo pip install click
答案 1 :(得分:0)
我在 Ubuntu 16.04 上遇到了类似的问题,按照此答案中给出的说明解决了这个问题:https://askubuntu.com/a/616990/68804
它主要包括:
click
中手动删除所有 /usr/local/lib/pythonX.Y/dist-packages
文件夹(可以有多个;我必须在 /usr/local/lib/python2.7/dist-packages
和 /usr/local/lib/python3.4/dist-packages
中都这样做);sudo apt-get update && sudo apt-get install -f
。