為什麼不能使用 readline 庫安裝指定的 mariadb 版本?
我的作業系統資訊:
uname -a Linux debian 5.10.0-9-amd64 #1 SMP Debian 5.10.70-1 (2021-09-30) x86_64 GNU/Linux
區域設置:
locale LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL=
我按照網頁的介紹安裝了mariadb。
sudo apt update && sudo apt upgrade sudo apt-get install curl software-properties-common dirmngr -y sudo curl -LsSO https://mariadb.org/mariadb_release_signing_key.asc sudo chmod -c 644 mariadb_release_signing_key.asc sudo mv -vi mariadb_release_signing_key.asc /etc/apt/trusted.gpg.d/ sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] https://mirror.realcompute.io/mariadb/repo/10.6/debian bullseye main' sudo apt update sudo apt install mariadb-server mariadb-client
現在您可以獲得所需的版本,如下所示:
mariadb --version mariadb Ver 15.1 Distrib 10.6.4-MariaDB, for debian-linux-gnu (x86_64) using readline EditLine wrapper
在我的作業系統中,我得到的是以下資訊:
mariadb --version mariadb Ver 15.1 Distrib 10.5.12-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper
**問題 #1:**在我的 /etc/apt/sources.list 中,它是:
deb [arch=ppc64el,arm64,amd64] https://mirror.realcompute.io/mariadb/repo/10.6/debian bullseye main deb-src [arch=ppc64el,arm64,amd64] https://mirror.realcompute.io/mariadb/repo/10.6/debian bullseye main
我已經指定了版本——
10.6
在sources.list
,為什麼是安裝的版本10.5
?**問題#2:**我已經安裝
libreadline-dev
在作業系統中:sudo dpkg -l | grep readline ii libreadline-dev:amd64 8.1-1 amd64 GNU readline and history libraries, development files ii libreadline8:amd64 8.1-1 amd64 GNU readline and history libraries, run-time libraries ii readline-common 8.1-1 all GNU readline and history libraries, common files
為什麼我安裝後它
for debian-linux-gnu (x86_64) using EditLine wrapper
在作業系統中,而不是for debian-linux-gnu (x86_64) using readline EditLine wrapper
在網頁中描述?cat /etc/apt/sources.list deb http://mirrors.163.com/debian/ bullseye main non-free contrib deb http://mirrors.163.com/debian/ bullseye-updates main non-free contrib deb http://mirrors.163.com/debian/ bullseye-backports main non-free contrib deb-src http://mirrors.163.com/debian/ bullseye main non-free contrib deb-src http://mirrors.163.com/debian/ bullseye-updates main non-free contrib deb-src http://mirrors.163.com/debian/ bullseye-backports main non-free contrib deb http://mirrors.163.com/debian-security/ bullseye/updates main non-free contrib deb-src http://mirrors.163.com/debian-security/ bullseye/updates main non-free contrib deb http://httpredir.debian.org/debian/ bullseye main contrib non-free deb http://deb.debian.org/debian bullseye-backports main deb [arch=amd64] https://download.docker.com/linux/debian bullseye stable deb [arch=ppc64el,arm64,amd64] https://mirror.realcompute.io/mariadb/repo/10.6/debian bullseye main deb-src [arch=ppc64el,arm64,amd64] https://mirror.realcompute.io/mariadb/repo/10.6/debian bullseye main
使用sources.list 更新:
sudo apt update && sudo apt list --upgradable Hit:1 http://mirrors.163.com/debian bullseye InRelease Hit:2 http://repo.mysql.com/apt/debian buster InRelease Get:3 http://mirrors.163.com/debian bullseye-updates InRelease [39.4 kB] Hit:4 http://dl.google.com/linux/chrome/deb stable InRelease Get:5 http://mirrors.163.com/debian bullseye-backports InRelease [43.7 kB] Get:6 http://deb.debian.org/debian bullseye-backports InRelease [43.7 kB] Hit:7 http://httpredir.debian.org/debian bullseye InRelease Ign:8 http://mirrors.163.com/debian-security bullseye/updates InRelease Err:9 http://mirrors.163.com/debian-security bullseye/updates Release 404 Not Found [IP: 112.90.131.246 80] Hit:11 https://download.docker.com/linux/debian bullseye InRelease Hit:10 https://cli-assets.heroku.com/apt ./ InRelease Get:12 http://mirrors.163.com/debian bullseye-backports/main Sources.diff/Index [63.3 kB] Get:13 http://deb.debian.org/debian bullseye-backports/main amd64 Packages.diff/Index [63.3 kB] Get:14 http://mirrors.163.com/debian bullseye-backports/main amd64 Packages.diff/Index [63.3 kB] Get:15 http://ppa.launchpad.net/boltgolt/howdy/ubuntu impish InRelease [18.0 kB] Get:16 http://mirrors.163.com/debian bullseye-backports/main Sources T-2021-11-13-1401.28-F-2021-11-13-0801.26.pdiff [623 B] Get:17 http://deb.debian.org/debian bullseye-backports/main Translation-en.diff/Index [25.2 kB] Get:16 http://mirrors.163.com/debian bullseye-backports/main Sources T-2021-11-13-1401.28-F-2021-11-13-0801.26.pdiff [623 B] Get:18 http://mirrors.163.com/debian bullseye-backports/main amd64 Packages T-2021-11-13-1401.28-F-2021-11-13-1401.28.pdiff [191 B] Get:18 http://mirrors.163.com/debian bullseye-backports/main amd64 Packages T-2021-11-13-1401.28-F-2021-11-13-1401.28.pdiff [191 B] Err:15 http://ppa.launchpad.net/boltgolt/howdy/ubuntu impish InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8CEBC97F3E9E1D58 Get:19 http://deb.debian.org/debian bullseye-backports/main amd64 Packages T-2021-11-13-2001.35-F-2021-11-13-1401.28.pdiff [14.5 kB] Get:19 http://deb.debian.org/debian bullseye-backports/main amd64 Packages T-2021-11-13-2001.35-F-2021-11-13-1401.28.pdiff [14.5 kB] Get:20 http://deb.debian.org/debian bullseye-backports/main Translation-en T-2021-11-13-2001.35-F-2021-11-13-2001.35.pdiff [9,997 B] Get:20 http://deb.debian.org/debian bullseye-backports/main Translation-en T-2021-11-13-2001.35-F-2021-11-13-2001.35.pdiff [9,997 B] Err:21 https://mirror.realcompute.io/mariadb/repo/10.6/debian bullseye InRelease Connection failed [IP: 114.141.111.226 443] Reading package lists... Done E: The repository 'http://mirrors.163.com/debian-security bullseye/updates Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. W: GPG error: http://ppa.launchpad.net/boltgolt/howdy/ubuntu impish InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8CEBC97F3E9E1D58 E: The repository 'http://ppa.launchpad.net/boltgolt/howdy/ubuntu impish InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.
升級 MariaDB
好的,您的條目中似乎有一些問題
/etc/apt/sources.list
需要解決(請參閱下面的部分了解更多資訊),儘管據我所知,這些與您的 MariaDB 問題無關。MariaDB 10.6 repo 的條目似乎執行良好。根據您給我的資訊,我最好的猜測是 MariaDB 的版本被推遲到 10.5.12,因為它在更新的 MariaDB 儲存庫添加到您的
sources.list
. 我的猜測是執行sudo apt upgrade
看起來像這樣:$ sudo apt upgrade Reading package lists... Done Building dependency tree... Done Reading state information... Done Calculating upgrade... Done The following packages have been kept back: mariadb-server 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
apt
不會自動將 MariaDB 升級到 10.6,因為這樣做需要刪除一些特定於 10.5 的依賴包。解決該問題應該像指定要顯式升級的mariadb-server
和包一樣簡單。mariadb-client
只需執行sudo apt upgrade mariadb-server mariadb-client
,提示應如下所示:$ sudo apt upgrade mariadb-server mariadb-client Reading package lists... Done Building dependency tree... Done Reading state information... Done Calculating upgrade... Done The following package was automatically installed and is no longer required: libconfig-inifiles-perl Use 'sudo apt autoremove' to remove it. The following packages will be REMOVED: mariadb-client-10.5 mariadb-client-core-10.5 mariadb-server-10.5 mariadb-server-core-10.5 The following NEW packages will be installed: libdaxctl1 libndctl6 libpmem1 liburing1 mariadb-client mariadb-client-10.6 mariadb-client-core-10.6 mariadb-server-10.6 mariadb-server-core-10.6 The following packages will be upgraded: mariadb-server 1 upgraded, 9 newly installed, 4 to remove and 0 not upgraded. Need to get 13.7 MB of archives. After this operation, 5,323 kB of additional disk space will be used. Do you want to continue? [Y/n]
如果是這樣,只需輸入
y
繼續,然後驗證 MariaDB 版本 10.6 是否已安裝mariadb --version
:$ mariadb --version mariadb Ver 15.1 Distrib 10.6.5-MariaDB, for debian-linux-gnu (x86_64) using readline EditLine wrapper
作為關於問題 #2 的旁注,版本 10.5的
mariadb --version
輸出應為. 這種特殊的怪癖是完全正常的,與.using EditLine wrapper``using readline Editline wrapper``libreadline-dev
旁注:Debian 安全鏡像
正如我之前所說,您有一些
sources.list
需要解決的問題。這超出了您的 MariaDB 問題的範圍,但我將在這裡做一個簡短的切線,以解決這些問題中最重要的問題,因為這是與安全相關的。這兩個
debian-security
源使用 Debian 10 (Buster) 和更早版本的舊格式,在升級到 Debian 11 (Bullseye) 期間進行了更改。您可以看到他們在sudo apt update
.deb http://mirrors.163.com/debian-security/ bullseye/updates main non-free contrib deb-src http://mirrors.163.com/debian-security/ bullseye/updates main non-free contrib
應該刪除這些行並用新格式替換。Debian 的安全團隊不鼓勵將鏡像用於安全儲存庫,因此這裡是官方鏡像。
deb http://security.debian.org/debian-security bullseye-security main contrib non-free deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free
還有一些來自內部源文件的其他錯誤,
/etc/apt/sources.list.d/
但修復這些錯誤超出了這個問題的範圍。sudo apt update
如果您想自己修復這些錯誤,請查看輸出中的錯誤。