首页 > 解决方案 > 无法启动“软件更新程序”:无法执行子进程 /usr/bin/update-manager(符号链接链接级别太多)

问题描述

我也有这个问题无法启动“软件和更新”:无法执行子进程“software-properties-gtk”(符号链接的级别太多)。

如果我在终端中编写software-properties-gtk我将遇到以下问题

rebeen@rebeen-Precision-5520:~$ software-properties-gtk
bash: /usr/bin/software-properties-gtk: /usr/bin/python3: bad interpreter: Too many levels of symbolic links

这是我的蟒蛇

rebeen@rebeen-Precision-5520:~$ ls -l /usr/bin/python*
lrwxrwxrwx 1 root root       9 Jan 26 12:30 /usr/bin/python -> python2.7
lrwxrwxrwx 1 root root       9 Apr 16  2018 /usr/bin/python2 -> python2.7
-rwxr-xr-x 1 root root 3641704 Oct  7 18:39 /usr/bin/python2.7
lrwxrwxrwx 1 root root      16 Dec 11 10:58 /usr/bin/python3 -> /usr/bin/python3
-rwxr-xr-x 2 root root 4526456 Nov  7 10:44 /usr/bin/python3.6
-rwxr-xr-x 2 root root 4526456 Nov  7 10:44 /usr/bin/python3.6m
-rwxr-xr-x 2 root root 4873376 Nov  7 10:50 /usr/bin/python3.7
-rwxr-xr-x 2 root root 4873376 Nov  7 10:50 /usr/bin/python3.7m
lrwxrwxrwx 1 root root      10 Oct 25  2018 /usr/bin/python3m -> python3.6m
lrwxrwxrwx 1 root root      58 Mar  6  2018 /usr/bin/pythontex -> ../share/texlive/texmf-dist/scripts/pythontex/pythontex.py
-rwxr-xr-x 1 root root     306 Mar  6  2018 /usr/bin/pythontex3

我尝试安装software-properties-gtk我遇到了以下问题

rebeen@rebeen-Precision-5520:~$ sudo apt-get install software-properties-gtk
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: The package ubuntu-drivers-common needs to be reinstalled, but I can't find an archive for it.
rebeen@rebeen-Precision-5520:~$ 

我试图安装ubuntu-drivers-common

rebeen@rebeen-Precision-5520:~$ sudo apt-get install ubuntu-drivers-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: The package ubuntu-drivers-common needs to be reinstalled, but I can't find an archive for it.

我尝试以不同的方式安装ubuntu-drivers-common

rebeen@rebeen-Precision-5520:~$ apt-get install -y ubuntu-drivers-common
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
rebeen@rebeen-Precision-5520:~$ 

这是输出sudo apt-get update

rebeen@rebeen-Precision-5520:~$ sudo apt-get update
Get:1 file:/var/cuda-repo-10-0-local-10.0.130-410.48  InRelease
Ign:1 file:/var/cuda-repo-10-0-local-10.0.130-410.48  InRelease                          
Get:2 file:/var/cuda-repo-10-0-local-10.0.130-410.48  Release [574 B]                    
Get:2 file:/var/cuda-repo-10-0-local-10.0.130-410.48  Release [574 B]                           
Hit:3 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic InRelease                                                                                                            
Hit:4 http://ppa.launchpad.net/inkscape.dev/stable/ubuntu bionic InRelease                                                                                                             
Hit:5 http://linux.teamviewer.com/deb stable InRelease                                                                                                                                 
Hit:6 https://deb.opera.com/opera-stable stable InRelease                                                                                                                              
Ign:7 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                                                           
Ign:8 http://ppa.launchpad.net/midori/ppa/ubuntu bionic InRelease                                                                                                                      
Get:9 https://brave-browser-apt-release.s3.brave.com bionic InRelease [3,170 B]                                                                                                        
Hit:10 http://ppa.launchpad.net/stefansundin/truecrypt/ubuntu bionic InRelease                                                                                                         
Ign:11 https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 InRelease                                                                                             
Get:12 https://desktop-download.mendeley.com/download/apt stable InRelease [2,456 B]                                                                                         
Hit:14 http://dl.google.com/linux/chrome/deb stable Release                                                                                                                            
Get:15 https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 Release [3,457 B]                                                                 
Hit:16 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease                                   
Get:17 https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 Release.gpg [801 B]
Hit:18 https://packages.microsoft.com/repos/vscode stable InRelease                                                                   
Err:19 http://ppa.launchpad.net/midori/ppa/ubuntu bionic Release                                    
  404  Not Found [IP: 91.189.95.83 80]
Err:9 https://brave-browser-apt-release.s3.brave.com bionic InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A8580BDC82D3DC6C
Err:17 https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 Release.gpg
  The following signatures were invalid: EXPKEYSIG 58712A2291FA4AD5 MongoDB 3.6 Release Signing Key <packaging@mongodb.com>
sh: 1: /usr/lib/cnf-update-db: Too many levels of symbolic links
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/midori/ppa/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://brave-browser-apt-release.s3.brave.com bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A8580BDC82D3DC6C
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/brave-browser.list:3 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/brave-browser.list:3 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/brave-browser.list:3 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/brave-browser.list:3 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/brave-browser.list:3 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list.d/brave-browser.list:3 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list.d/brave-browser.list:3 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list.d/brave-browser.list:3 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/brave-browser.list:3 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/brave-browser.list:3 and /etc/apt/sources.list.d/google-chrome.list:3
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 Release: The following signatures were invalid: EXPKEYSIG 58712A2291FA4AD5 MongoDB 3.6 Release Signing Key <packaging@mongodb.com>
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/brave-browser.list:3 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/brave-browser.list:3 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/brave-browser.list:3 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/brave-browser.list:3 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list.d/brave-browser.list:3 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list.d/brave-browser.list:3 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list.d/brave-browser.list:3 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list.d/brave-browser.list:3 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target CNF (main/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list.d/brave-browser.list:3 and /etc/apt/sources.list.d/google-chrome.list:3
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/brave-browser.list:3 and /etc/apt/sources.list.d/google-chrome.list:3

标签: pythonubuntu-18.04

解决方案


符号链接 /usr/bin/python3 的目的地是循环的。您可以按如下方式解决。

sudo unlink /usr/bin/python3
sudo ln -s /usr/bin/python3.6 /usr/bin/python3

推荐阅读