Ubuntu 安装错误

Ubuntu 安装错误

每次我尝试安装某些东西时,它都会显示错误“无法找到包 xxx”

$ sudo apt-get install gddrescue
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package gddrescue

sudo apt-get install testdisk
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package testdisk

$ lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.4 LTS
Release:        16.04
Codename:       xenial

我该如何解决此问题?

这是正常的吗……?(感谢纠正)

sudo apt update
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.

答案1

提示:当你得到无法找到程序包 xxx, 去https://packages.ubuntu.com并搜索包名称。你会发现在你的情况下,gddrescue在 下可用universe。因此,我们需要添加它。尝试以下操作:

sudo add-apt-repository universe
sudo apt update
sudo apt install gddrescue

相关内容