更新相关问题,软件和更新不起作用

更新相关问题,软件和更新不起作用

我正在使用 Ubuntu 20.04.3. LTS。软件和更新应用程序无法在我的系统上运行。我不在乎,因为我更喜欢使用终端进行更新。但是,我不知道如何删除未使用的存储库(我之前添加了 FDM 存储库,现在我不再使用 FDM,但它的存储库仍然存在)。

即使它不困扰我。我的问题是与更新错误相关的通知。我已将消息粘贴在下面。

出现错误,请从右键菜单运行软件包管理器或在终端中运行 apt-get 查看错误所在。错误消息为:“错误:打开缓存(E:无法打开 /var/lib/apt/lists/ppa.launchpad.net_alex-p_tesseract-ocr-devel_ubuntu_dists_focal_InRelease -fopen(13:权限被拒绝),E:软件包列表或表示您安装的软件包具有未解决的依赖关系显示更新显示通知首选项

这就是我一直收到的通知。使用 sudo apt-get upgrade 命令更新系统时,我没有遇到任何问题。

我只是想摆脱这个通知并修复软件和更新应用程序无法打开的问题。

以下是输出apt-get

amartya@amartya-Pavilion-15t-cs200:~$ apt-get

apt 2.0.6 (amd64)

Usage: apt-get [options] command

apt-get [options] install|remove pkg1 [pkg2 ...]
apt-get [options] source pkg1 [pkg2 ...]
apt-get is a command line interface for retrieval of packages
and information about them from authenticated sources and
for installation, upgrade and removal of packages together
with their dependencies.
Most used commands:
update - Retrieve new lists of packages
upgrade - Perform an upgrade
install - Install new packages (pkg is libc6 not libc6.deb)
reinstall - Reinstall packages (pkg is libc6 not libc6.deb)
remove - Remove packages
purge - Remove packages and config files
autoremove - Remove automatically all unused packages
dist-upgrade - Distribution upgrade, see apt-get(8)
dselect-upgrade - Follow dselect selections
build-dep - Configure build-dependencies for source packages
satisfy - Satisfy dependency strings
clean - Erase downloaded archive 
autoclean - Erase old downloaded archive files
check - Verify that there are no broken dependencies
source - Download source archives
download - Download the binary package into the current directory
changelog - Download and display the changelog for the given package
See apt-get(8) for more information about the available commands.
Configuration options and syntax is detailed in apt.conf(5).
Information about how to configure sources can be found in sources.list(5).
Package and version choices can be expressed via apt_preferences(5).
Security details are available in apt-secure(8).
                                        This APT has Super Cow Powers.

以下是输出sudo apt update

amartya@amartya-Pavilion-15t-cs200:~$ sudo apt update
[sudo] password for amartya: 
Hit:1 http://in.archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]                          
Hit:3 http://dl.google.com/linux/chrome/deb stable InRelease                                        
Get:4 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]                        
Hit:5 http://ppa.launchpad.net/alex-p/tesseract-ocr-devel/ubuntu focal InRelease                    
Get:6 http://in.archive.ubuntu.com/ubuntu focal-security InRelease [114 kB]                         
Get:7 http://in.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [536 kB]                 
Hit:8 http://ppa.launchpad.net/daniruiz/flat-remix/ubuntu focal InRelease                           
Get:9 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,214 kB]              
Hit:10 https://debrepo.freedownloadmanager.org bionic InRelease                                     
Get:11 https://repo.protonvpn.com/debian stable InRelease [2,519 B]                                 
Hit:12 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal InRelease                     
Get:13 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [282 kB]
Get:14 http://in.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [855 kB]           
Get:15 http://in.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [352 kB]    
Hit:16 http://ppa.launchpad.net/flexiondotorg/cpu-x/ubuntu focal InRelease              
Get:17 http://in.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [944 B]
Get:18 http://in.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [10.4 kB] 
Get:19 http://in.archive.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [27.6 kB]      
Get:20 http://in.archive.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [61.3 kB]  
Get:21 http://in.archive.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [2,464 B]
Hit:22 http://ppa.launchpad.net/gns3/ppa/ubuntu focal InRelease                                     
Hit:23 http://ppa.launchpad.net/micahflee/ppa/ubuntu focal InRelease
Fetched 3,673 kB in 3s (1,137 kB/s)                
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.

这是文件权限

amartya@amartya-Pavilion-15t-cs200:~$ sudo ls -l /var/lib/apt/lists/ppa.launchpad.net_alex-p_tesseract-ocr-devel_ubuntu_dists_focal_InRelease
-rw-r--r-- 1 root root 17583 Aug 25 02:10 /var/lib/apt/lists/ppa.launchpad.net_alex-p_tesseract-ocr-devel_ubuntu_dists_focal_InRelease

以下是输出history |grep add-apt

amartya@amartya-Pavilion-15t-cs200:~$ history |grep add-apt
 1281  sudo add-apt-repository ppa:flexiondotorg/cpu-x
 1305  sudo add-apt-repository ppa:gns3/ppa
 1318  sudo add-apt-repository ppa:micahflee/ppa
 1827  sudo add-apt-repository ppa:alex-p/tesseract-ocr-devel
 1997  history |grep add-apt
 2003  history |grep add-apt

答案1

错误:打开缓存(E:无法打开/var/lib/apt/lists/ppa.launchpad.et_alex-p__tesseract-ocr-devel__ubuntu__dists__focal_-InRelease-fopen(13:权限被拒绝)

检查文件的文件权限

sudo ls -l /var/lib/apt/lists/ppa.launchpad.et_alex-p__tesseract-ocr-devel__ubuntu__dists__focal_-InRelease-fopen

它应该告诉您谁拥有它,以及为什么存在权限问题。

我不知道如何删除未使用的存储库(我之前添加了 FDM 存储库...

你是如何添加它的?命令行还是通过 GUI?删除不再使用的存储库是一个好主意。

如果你通过命令行安装:

history |grep add-apt

根据时间长短,这可能会显示用于添加它的命令,您可以通过 Google 查找该命令的反向命令。

最坏的情况是,您可以随时直接编辑 repos 文件。这是与您的问题相关的另一个问题:如何删除存储库?

相关内容