E:软件包‘mysql-server’没有安装候选项

E:软件包‘mysql-server’没有安装候选项
apt-get install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package mysql-server is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'mysql-server' has no installation candidate

我也尝试了 apt-get update && 和 apt-get upgrade,但它根本不起作用

答案1

请检查您的 /etc/apt/sources.list 配置。它是否有指向“主”存储库部分的行?例如, deb http://de.archive.ubuntu.com/ubuntu/ bionic main 其中“bionic”可能为其他 ubuntu 版本(它应该与 /etc/lsb-release 中的 DISTRIB_CODENAME 匹配)。

或者您可能遇到网络/代理问题,导致您根本无法访问软件包存储库。apt-get update 是否显示任何错误?

相关内容