The cache is empty. You need to run “apt-file update“ first.

操作系统版本:

        uniontechos-desktop-20-professional-1040-amd64.iso

        uniontechos-desktop-20-professional-1050-amd64.iso

        今日安装 apt-file 后,出现以下问题

root@uniontech:~# apt-file search  dget
Finding relevant cache files to search ...E: The cache is empty. You need to run "apt-file update" first.

        虽然重复执行了 n 次 "apt-file update" ,但是依旧提示 The cache is empty. You need to run "apt-file update" first.

root@uniontech:~# apt-file update
命中:3 https://professional-packages.chinauos.com/printer eagle InRelease
获取:2 https://professional-packages.chinauos.com/desktop-professional eagle InRelease [19.7 kB]
获取:1 https://professional-store-packages.chinauos.com/appstore eagle InRelease [6,129 B]
获取:4 https://professional-store-packages.chinauos.com/appstore eagle/appstore amd64 Packages [956 kB]
已下载 981 kB,耗时 3秒 (321 kB/s)
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
有 561 个软件包可以升级。请执行 ‘apt list --upgradable’ 来查看它们。
 

       查询论坛后得知 Deepin源不支持 apt-file文件查找功能 https://bbs.deepin.org/zh/post/40803

实在想使用的话,一个临时方案可以考虑在 /etc/apt/sources.list.d/ 下放入一个 Debian 的源。

root@uniontech:~# apt edit-sources Debian-Stable.list

deb http://mirrors.163.com/debian/ buster main non-free contrib
deb http://mirrors.163.com/debian/ buster-updates main non-free contrib
deb http://mirrors.163.com/debian/ buster-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ buster/updates main non-free contrib

deb-src http://mirrors.163.com/debian/ buster main non-free contrib
deb-src http://mirrors.163.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.163.com/debian-security/ buster/updates main non-free contrib

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
"Failed to start apt-news.service: Unit apt-news.service not found" 和 "Failed to start esm-cache.service: Unit esm-cache.service not found" 这两个错误信息通常是由于系统中缺少相应的服务单元导致的。 在Linux系统中,服务单元是用来管理和控制系统服务的配置文件。当系统启动时,会根据这些配置文件来启动相应的服务。如果系统中找不到对应的服务单元文件,就会出现上述错误。 要解决这个问题,你可以尝试以下几个步骤: 1. 检查服务单元文件是否存在:使用命令 `ls /etc/systemd/system/` 来查看 `/etc/systemd/system/` 目录下是否存在 `apt-news.service` 和 `esm-cache.service` 这两个文件。如果不存在,可能是因为这些服务并没有被正确安装或配置。 2. 重新安装相关软件包:如果确实缺少这些服务单元文件,你可以尝试重新安装相关软件包来修复问题。例如,对于 `apt-news.service`,你可以尝试重新安装 `apt` 软件包;对于 `esm-cache.service`,你可以尝试重新安装 `esm-cache` 软件包。 3. 更新系统:有时候,更新系统可以修复一些缺少或损坏的服务单元文件的问题。你可以使用适合你的Linux发行版的包管理器来更新系统。 4. 检查日志文件:如果以上步骤都没有解决问题,你可以查看系统日志文件,例如 `/var/log/syslog` 或 `/var/log/messages`,以获取更多关于错误的详细信息。根据日志中的提示,你可能需要进一步调查和解决其他问题。 希望以上信息对你有帮助!如果你还有其他问题,请随时提问。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值