如何安装特定版本的 mariadb-server(10.3.22)

如何安装特定版本的 mariadb-server(10.3.22)

我必须安装 mariadb-server-10.3.22,但是当我尝试使用apt list mariadb-server -a命令找出数据包时,它返回两个可用的包:

mariadb-server/focal-updates,focal-updates,focal-security,focal-security 1:10.3.34-0ubuntu0.20.04.1 all
mariadb-server/focal,focal 1:10.3.22-1ubuntu1 all

我如何安装第二个mariadb-server/focal,focal 1:10.3.22-1ubuntu1 all

答案1

你可能已经找到答案了,但我还是想在这里补充一下我的想法:需要附加软件包版本充分正如您在查询中看到的那样,并且在这种情况下,我们还需要包含 mariadb 10.3.22 客户端包依赖项,格式如下(截至 2023 年 4 月 12 日):

apt install mariadb-server-10.3=1:10.3.22-1ubuntu1 mariadb-server-core-10.3=1:10.3.22-1ubuntu1 mariadb-client-10.3=1:10.3.22-1ubuntu1 mariadb-client-core-10.3=1:10.3.22-1ubuntu1
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libxmlb1
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
  galera-3 libcgi-fast-perl libcgi-pm-perl libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libencode-locale-perl libfcgi-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl
  libio-html-perl liblwp-mediatypes-perl libsnappy1v5 libterm-readkey-perl libtimedate-perl liburi-perl mariadb-common socat
Suggested packages:
  libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl libdata-dump-perl libipc-sharedcache-perl libwww-perl mailx mariadb-test tinyca
The following NEW packages will be installed:
  galera-3 libcgi-fast-perl libcgi-pm-perl libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libencode-locale-perl libfcgi-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl
  libio-html-perl liblwp-mediatypes-perl libsnappy1v5 libterm-readkey-perl libtimedate-perl liburi-perl mariadb-client-10.3 mariadb-client-core-10.3 mariadb-common mariadb-server-10.3 mariadb-server-core-10.3 socat
0 upgraded, 25 newly installed, 0 to remove and 61 not upgraded.
Need to get 29.7 MB of archives.
After this operation, 222 MB of additional disk space will be used.
Do you want to continue? [Y/n]

我希望它能有所帮助,不用担心,我花了十几分钟才找出适合 Ubuntu focal 的正确版本 ;-)

lsb_release -a
Description:    Ubuntu 20.04.5 LTS
Release:        20.04
Codename:       focal

相关内容