【问题标题】:Cannot install mySQL/maridDB on Debian 7 (Wheezy)无法在 Debian 7 上安装 mySQL/maridDB (Wheezy)
【发布时间】:2018-03-22 16:05:08
【问题描述】:

堆栈溢出。 在过去的几天里,我一直在努力在我的树莓派 2 上安装 mySQL:/ 我不是 Debian 7 (Wheezy),我无法更改发行版,必须使用它。所以,我需要安装 MySQL 5.5 或更高版本,或者 MariaDB,我已经尝试安装两者,但没有一个工作。
安装 MariaDB 时,按照他们的 documentation,当我说到重点时

sudo apt-get install mariadb-server

出现错误:

The following packages have unmet dependencies:
 mariadb-server : Depends: mariadb-server-10.0 (= 10.0.32+maria-1~wheezy) but it is not installable

尝试谷歌搜索并寻找类似的案例,但找不到任何可行的方法。
使用 mySQL 的情况更糟。使用他们的documentation 和 MySQL APT 存储库和tutorials 执行以下步骤:

wget https://dev.mysql.com/get/mysql-apt-config_0.8.8-1_all.deb
dpkg -i mysql-apt-config_0.8.8-1_all.deb (choosing mysql 5.6)
apt-get update

显示错误:

apt-get update
Hit http://mirror.zol.co.zw wheezy Release.gpg
Hit http://mirror.zol.co.zw wheezy Release
Hit http://mirror.zol.co.zw wheezy/main Sources
Hit http://mirror.zol.co.zw wheezy/main amd64 Packages
Hit http://mirror.zol.co.zw wheezy/main i386 Packages
Ign http://mirror.zol.co.zw wheezy/main Translation-en_GB
Ign http://mirror.zol.co.zw wheezy/main Translation-en
Hit http://archive.raspberrypi.org wheezy Release.gpg
Hit http://raspberrypi.collabora.com wheezy Release.gpg
Hit http://raspberrypi.collabora.com wheezy Release
Get:1 http://repo.mysql.com wheezy Release.gpg [173 B]
Hit http://archive.raspberrypi.org wheezy Release
Hit http://raspberrypi.collabora.com wheezy/rpi armhf Packages
Hit http://archive.raspberrypi.org wheezy/main armhf Packages
Get:2 http://repo.mysql.com wheezy Release [24.1 kB]
Get:3 http://repo.mysql.com wheezy/mysql-5.6 Sources [859 B]
Ign http://raspberrypi.collabora.com wheezy/rpi Translation-en_GB
Ign http://raspberrypi.collabora.com wheezy/rpi Translation-en
Ign http://archive.raspberrypi.org wheezy/main Translation-en_GB
Ign http://archive.raspberrypi.org wheezy/main Translation-en
Fetched 25.2 kB in 5s (4,900 B/s)
W: Failed to fetch http://repo.mysql.com/apt/debian/dists/wheezy/Release  Unable                                                            to find expected entry 'mysql-apt-config/binary-armhf/Packages' in Release file                                                            (Wrong sources.list entry or malformed file)

E: Some index files failed to download. They have been ignored, or old ones used                                                            instead.

如果我尝试:

apt-get install mysql-community-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mysql-community-server

请帮助,任何帮助将不胜感激!

【问题讨论】:

    标签: mysql linux debian mariadb raspbian-wheezy


    【解决方案1】:

    官方 debian 存储库中似乎没有任何名称为 mysql-community-server 的软件包。我找到了mysql-server 包。 https://packages.debian.org/wheezy/mysql-server.

    所以试试这个:

    • 将官方 debian 存储库添加到您的源列表(即将 deb http://security.debian.org/debian-security wheezy/updates main 添加到文件 /etc/apt/sources.list
    • sudo apt-get update
    • sudo apt-get install mysql-server

    【讨论】:

    • 哦,显示同样的错误...sudo apt-get install mysql-server ... E: Unable to locate package mysql-server
    • 尝试按照本指南逐步操作:dev.mysql.com/doc/mysql-apt-repo-quick-guide/en
    • 或者干脆试试:sudo apt-get install mysql-server-5.5
    • 感谢您的回复。 Ambady Anand S,这就是我正在经历的确切指令,并且正在接收“W:无法获取repo.mysql.com/apt/debian/dists/wheezy/ReleaseUnable”。并且 sudo apt-get install mysql-server-5.5 仍然显示“Could't find any package by regex 'mysql-server-5.5'”
    • 好的,尝试将官方 debian repo 添加到您的源列表中。即将deb http://security.debian.org/debian-security wheezy/updates main添加到文件/etc/apt/sources.list,然后运行sudo apt-get update,然后运行sudo apt-get install mysql-server-5.5。我希望这会奏效。
    猜你喜欢
    • 2015-12-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-11-30
    • 1970-01-01
    • 1970-01-01
    • 2016-09-07
    • 2014-02-10
    相关资源
    最近更新 更多