我严重损坏了我的包裹系统。所以我找到了另一个解决方案,
sudo apt-get build-dep <package>
但是当我输入时sudo apt-get build-dep update-manager
,我得到了,
E: You must put some 'source' URIs in your sources.list
然后我使用sudo nano /etc/apt/sources.list
. 清单是空白的。现在我不确定如何添加更多源 URI。我无法访问软件更新程序来更改它。我试过 Synaptic 包管理器。
sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package python3 needs to be reinstalled, but I can't find an archive for it.
更新:
我已经使用@karel 对 Cat /etc/apt/sources.list 的正确输出是什么的回答编辑了 sources.list?并替换bionic
为cosmic
.
现在,当我尝试启动时software-properties-gtk
,我得到:
bash: /usr/bin/software-properties-gtk: /usr/bin/python3: bad interpreter: Too many levels of symbolic links
python3符号链接的输出:
$ ls -l /usr/bin/python3
lrwxrwxrwx 1 root root 18 May 27 20:30 /usr/bin/python3 -> /usr/bin/python3.6
$ ls -l /usr/bin/python3.6
lrwxrwxrwx 1 root root 25 May 27 16:31 /usr/bin/python3.6 -> /etc/alternatives/python3
$ ls -l /etc/alternatives/python3
lrwxrwxrwx 1 root root 18 May 27 16:31 /etc/alternatives/python3 -> /usr/bin/python3.6
输出ls -l /usr/bin/python*
:
lrwxrwxrwx 1 root root 18 May 27 23:10 /usr/bin/python -> /usr/bin/python3.2
lrwxrwxrwx 1 root root 9 Jun 7 2018 /usr/bin/python2 -> python2.7
-rwxr-xr-x 1 root root 3691008 Apr 9 05:50 /usr/bin/python2.7
lrwxrwxrwx 1 root root 18 May 27 20:30 /usr/bin/python3 -> /usr/bin/python3.6
lrwxrwxrwx 1 root root 25 May 27 16:31 /usr/bin/python3.6 -> /etc/alternatives/python3
lrwxrwxrwx 1 root root 33 Apr 9 05:59 /usr/bin/python3.6-config -> x86_64-linux-gnu-python3.6-config
-rwxr-xr-x 1 root root 4530552 Apr 9 05:59 /usr/bin/python3.6m
lrwxrwxrwx 1 root root 34 Apr 9 05:59 /usr/bin/python3.6m-config -> x86_64-linux-gnu-python3.6m-config
-rwxr-xr-x 2 root root 4804160 Apr 9 05:56 /usr/bin/python3.7
-rwxr-xr-x 2 root root 4804160 Apr 9 05:56 /usr/bin/python3.7m
lrwxrwxrwx 1 root root 16 Oct 25 2018 /usr/bin/python3-config -> python3.6-config
lrwxrwxrwx 1 root root 10 Oct 25 2018 /usr/bin/python3m -> python3.6m
lrwxrwxrwx 1 root root 17 Oct 25 2018 /usr/bin/python3m-config -> python3.6m-config
您今天学到了宝贵的一课:在编辑文件之前备份文件。
如果你弄乱了文件,你可以复制备份并重新开始:
需要考虑的事情:
/tmp
文件在重新启动时被删除。备份时要小心/tmp
。要恢复您的
sources.list
文件,您可以清空sources.list
文件,然后使用software-properties-gtk
重新创建列表。有关此过程的详细信息可在此答案中找到,但您可以使用 GUI 取消选中并检查您想要的来源。您至少需要“主要”,并且可能还需要“宇宙”。启用这些后,请务必通过apt update
.