安装 MySQL 5.1

安装 MySQL 5.1

这个问题肯定是https://stackoverflow.com/questions/1632056/how-do-you-install-mysql-5-1-on-ubuntu-8-10

因为我无法评论那个...我要开始一个新的。我遇到了与之前的 OP 相同的问题,我遵循了 Andrew 提供的答案(第一个有 2 票赞成的答案)并添加了 repo。:

deb http://packages.dotdeb.org lenny all

做了

sudo apt-get update

然后

sudo apt-get install mysql-server-5.1

但我仍然收到以下错误:

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: mysql-server-5.1 from the Synaptic Package
Depends: mysql-client-5.1 (>= 5.1.58-1~dotdeb.0) but it is not going to be
installed Depends: libdbi-perl but it is not installable 
Recommends: libhtml-template-perl but it is not installable 
E: Broken packages

我还从 synaptic 包管理器找到了 mysql-server-5.1,并尝试从那里更新包,但仍然出现以下错误:

mysql-server-5.1:
 Depends: mysql-client-5.1 but it is not going to be installed
 Depends: libdbi-perl  but it is not installable
 Recommends: libhtml-template-perl  but it is not installable

编辑:

添加 dotdeb repo 后 sources.list 文件的内容。

# deb cdrom:[Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1)]/ natty main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ natty main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ natty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ natty-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ natty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ natty universe
deb-src http://us.archive.ubuntu.com/ubuntu/ natty universe
deb http://us.archive.ubuntu.com/ubuntu/ natty-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ natty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ natty multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ natty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ natty-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ natty-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://us.archive.ubuntu.com/ubuntu/ natty-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ natty-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu natty-security main restricted
deb-src http://security.ubuntu.com/ubuntu natty-security main restricted
deb http://security.ubuntu.com/ubuntu natty-security universe
deb-src http://security.ubuntu.com/ubuntu natty-security universe
deb http://security.ubuntu.com/ubuntu natty-security multiverse
deb-src http://security.ubuntu.com/ubuntu natty-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu natty partner
deb-src http://archive.canonical.com/ubuntu natty partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu natty main
deb-src http://extras.ubuntu.com/ubuntu natty main
deb http://archive.canonical.com/ lucid partner
deb-src http://archive.canonical.com/ lucid partner
deb http://packages.dotdeb.org lenny all
deb-src http://packages.dotdeb.org lenny all

我在安装几乎所有软件包(如 openJDK、Skype...)时都遇到了问题。:(

答案1

dotdeb.org 提供的版本已经非常过时,Ubuntu Natty 的存储库中已经有 MySQL 服务器包。

我建议您删除最后三行deb以及deb-src默认未添加的行:

  • extras.ubuntu.com:截至目前,该存储库中没有可用的 natty 软件包。这只会导致更新软件包列表延迟,因为仍然必须获取它
  • archive.canonical.com lucid partner:lucid?您正在运行 Natty,并且已经有一个 Natty 合作伙伴仓库。
  • packages.dotdeb.org:这些软件包是为 Debian 制作的,可能与 Ubuntu 不兼容

请修复该问题,刷新您的软件包列表(sudo apt-get update)并尝试再次安装 MySQL:

sudo apt-get install mysql-server

相关内容