programing

Ubuntu의 MariaDB - 특정 버전

newnotes 2023. 9. 2. 10:13
반응형

Ubuntu의 MariaDB - 특정 버전

테스트 목적으로 Ubuntu에 MariaDB의 특정 버전을 설치하려고 합니다.저는 이 가이드에 따라 mariadb-server와 mariadb-client 패키지의 버전을 지정하지 않으면 모든 것이 잘 작동합니다.버전을 지정하려고 할 때 명령어 사용

sudo apt install mariadb-server=1:10.4.12+maria~bionic mariadb-client=1:10.4.12+maria~bionic

다음 오류 메시지가 표시됩니다.

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:
 mariadb-client : Depends: mariadb-client-10.4 (>= 1:10.4.12+maria~bionic) but it is not going to be installed
 mariadb-server : Depends: mariadb-server-10.4 (>= 1:10.4.12+maria~bionic) but it is not going to be installed
E: Unable to correct problems, you have held broken packages. 

그래서 명령을 다음으로 변경했습니다.

sudo apt install mariadb-server=1:10.4.12+maria~bionic mariadb-server-10.4=1:10.4.12+maria~bionic mariadb-client=1:10.4.12+maria~bionic mariadb-client-10.4=1:10.4.12+maria~bionic

설치 프로세스가 끝나면 올바른 버전이 설치된 것 같습니다.

dave@pctest:~$ sudo apt policy mariadb-server
mariadb-server:
  Installed: 1:10.4.12+maria~bionic
  Candidate: 1:10.4.13+maria~bionic

하지만 셸에 들어가면 버전이 다릅니다.

dave@pctest:~$ sudo mysql -u root
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 50
Server version: 10.4.13-MariaDB-1:10.4.13+maria~bionic-log mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> select version();
+--------------------------------------------+
| version()                                  |
+--------------------------------------------+
| 10.4.13-MariaDB-1:10.4.13+maria~bionic-log |
+--------------------------------------------+
1 row in set (0.000 sec)

무엇이 잘못되고 있습니까?

다른 사람이 이 문제를 가지고 있는 경우 - mariadb와 함께 설치된 많은 종속성이 있으며 이는 기본적으로 최신 버전입니다.이것들은 Ubuntu 20.04.2에서 작동하는 이전 버전의 10.4를 얻기 위해 설치해야 했던 것들입니다(mariadb의 현재 버전은 10.4.19입니다 - 심하게 손상되었습니다).

mariadb-client-10.4
mariadb-client-core-10.4
마리아 데브 공통의
mariadb-server-core-10.4
mysql-common
libmariadb3
mariadb-server-10.4
mariadb-server
mariadb-client
mariadb 백업

sudo apt install mariadb-client-10.4=1:10.4.17+maria~focal mariadb-client-core-10.4=1:10.4.17+maria~focal mariadb-common=1:10.4.17+maria~focal mariadb-server-core-10.4=1:10.4.17+maria~focal mysql-common=1:10.4.17+maria~focal  libmariadb3=1:10.4.17+maria~focal

sudo apt install mariadb-server-10.4=1:10.4.17+maria~focal mariadb-server=1:10.4.17+maria~focal mariadb-client=1:10.4.17+maria~focal mariadb-backup=1:10.4.17+maria~focal

sudo apt-mark hold mariadb-client-10.4 mariadb-client-core-10.4 mariadb-common mariadb-server-core-10.4 mysql-common libmariadb3 mariadb-server-10.4 mariadb-server mariadb-client mariadb-backup

ReferenceURL : https://stackoverflow.com/questions/61949306/mariadb-on-ubuntu-specific-version

반응형