sudo aptitude install 不安装建议的软件包

sudo aptitude install 不安装建议的软件包

我想default-libmysqlclient-dev使用安装

sudo apt-get install default-libmysqlclient-dev

但我得到了这个输出

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 default-libmysqlclient-dev : Depends: libmysqlclient-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

所以我尝试使用不同的方法aptitude

sudo aptitude -f install default-libmysqlclient-dev

现在我得到了

The following NEW packages will be installed:
  default-libmysqlclient-dev libmysqlclient-dev{ab}
0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,126 kB of archives. After unpacking 6,959 kB will be used.
The following packages have unmet dependencies:
 libmysqlclient-dev : Depends: libmysqlclient20 (= 5.7.21-1ubuntu1) but 5.7.27-0ubuntu0.18.04.1 is installed
The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     default-libmysqlclient-dev [Not Installed]
2)     libmysqlclient-dev [Not Installed]



Accept this solution? [Y/n/q/?]

接受解决方案(Y)后,我得到了这个输出

No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

所以什么都没安装

系统信息

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
aarch64

我认为对于这些规格,我有可供下载的包

我该如何解决这个问题?

编辑

命令

grep ^deb -r /etc/apt/ --include=*.list

输出:

/etc/apt/sources.list:deb http://ports.ubuntu.com/ubuntu-ports/ bionic main universe restricted multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu bionic-security main
/etc/apt/sources.list:deb http://ports.ubuntu.com/ubuntu xenial-security main
/etc/apt/sources.list.d/cuda-10-0-local-10.0.326.list:deb file:///var/cuda-repo-10-0-local-10.0.326 /
/etc/apt/sources.list.d/visionworks-sfm-repo.list:deb-src file:///var/visionworks-sfm-repo /
/etc/apt/sources.list.d/visionworks-sfm-repo.list:deb file:///var/visionworks-sfm-repo /
/etc/apt/sources.list.d/visionworks-tracking-repo.list:deb-src file:///var/visionworks-tracking-repo /
/etc/apt/sources.list.d/visionworks-tracking-repo.list:deb file:///var/visionworks-tracking-repo /
/etc/apt/sources.list.d/visionworks-repo.list:deb-src file:///var/visionworks-repo /
/etc/apt/sources.list.d/visionworks-repo.list:deb file:///var/visionworks-repo /

答案1

你应该修复你的存储库。将以下几行/etc/apt/sources.list

deb http://ports.ubuntu.com/ubuntu-ports/ bionic main universe restricted multiverse
deb http://security.ubuntu.com/ubuntu bionic-security main
deb http://ports.ubuntu.com/ubuntu xenial-security main

更改为以下内容:

deb http://archive.ubuntu.com/ubuntu bionic main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu bionic-security main restricted universe multiverse

然后运行sudo apt-get update更新包列表并继续安装 Ubuntu 18.04.5 LTS 的最新升级sudo apt-get dist-upgrade

相关内容