我无法安装mariadb-server。我运行以下命令:
- sudo apt安装mariadb服务器mariadb客户端y**
将显示以下消息:
Building dependency tree... Done
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.
mariadb-client-core-10.5 : Depends: libreadline5 (>= 5.2) but it is not installable
E: Unable to correct problems, you have held broken packages.
我该如何修复这些依赖关系?
提前感谢!!!
- sudo倾向于安装mariadb客户端核心-10.5-y**
Reading package lists... Done
Building dependency tree... Done
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.
mariadb-client-core-10.5 : Depends: libreadline5 (>= 5.2) but it is not installable
E: Unable to correct problems, you have held broken packages.
我已经试过了
- sudo aptitude安装mariadb服务器**
The following NEW packages will be installed:
gawk{a} libsigsegv2{a} mariadb-server{b}
0 packages upgraded, 3 newly installed, 0 to remove and 19 not upgraded.
Need to get 434 kB of archives. After unpacking 1.772 kB will be used.
The following packages have unmet dependencies:
mariadb-server : Depends: mariadb-server-10.5 (>= 1:10.5.15+maria~focal) but it is not installable
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) mariadb-server [Not Installed]
Accept this solution? [Y/n/q/?] Y
The following NEW packages will be installed:
gawk{a} libsigsegv2{a}
0 packages upgraded, 2 newly installed, 0 to remove and 19 not upgraded.
Need to get 430 kB of archives. After unpacking 1.761 kB will be used.
Do you want to continue? [Y/n/?] Y
Get: 1 http://es.archive.ubuntu.com/ubuntu impish/main amd64 libsigsegv2 amd64 2.13-1ubuntu2 [14,6 kB]
Get: 2 http://es.archive.ubuntu.com/ubuntu impish/main amd64 gawk amd64 1:5.1.0-1build1 [416 kB]
Fetched 430 kB in 1s (718 kB/s)
Selecting previously unselected package libsigsegv2:amd64.
(Reading database ... 209196 files and directories currently installed.)
Preparing to unpack .../libsigsegv2_2.13-1ubuntu2_amd64.deb ...
Unpacking libsigsegv2:amd64 (2.13-1ubuntu2) ...
Setting up libsigsegv2:amd64 (2.13-1ubuntu2) ...
Selecting previously unselected package gawk.
(Reading database ... 209203 files and directories currently installed.)
Preparing to unpack .../gawk_1%3a5.1.0-1build1_amd64.deb ...
Unpacking gawk (1:5.1.0-1build1) ...
Setting up gawk (1:5.1.0-1build1) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for libc-bin (2.34-0ubuntu3.2) ...
我已经安装了具有aptitude的客户端:
- sudo aptitude安装mariadb客户端**
The following NEW packages will be installed:
mariadb-client{b}
0 packages upgraded, 1 newly installed, 0 to remove and 19 not upgraded.
Need to get 3.096 B of archives. After unpacking 10,2 kB will be used.
The following packages have unmet dependencies:
mariadb-client : Depends: mariadb-client-10.5 (>= 1:10.5.15+maria~focal) but it is not installable
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) mariadb-client [Not Installed]
Accept this solution? [Y/n/q/?]
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
客户端仍然无法连接....
Command 'mysql' not found, but can be installed with:
sudo apt install mysql-client-core-8.0 # version 8.0.28-0ubuntu0.21.10.3, or
sudo apt install mariadb-client-core-10.5 # version 1:10.5.15-0ubuntu0.21.10.1
juanma@juanma-HP-Laptop-17-ca1xxx:~$ mariadb
Command 'mariadb' not found, but can be installed with:
sudo apt install mariadb-client-core-10.5
juanma@juanma-HP-Laptop-17-ca1xxx:~$ sudo apt install mariadb-client-core-10.5 -y
Reading package lists... Done
Building dependency tree... Done
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.
mariadb-client-core-10.5 : Depends: libreadline5 (>= 5.2) but it is not installable
E: Unable to correct problems, you have held broken packages.
谢谢
最后我用Docker和一个脚本完成了它,它工作得很完美。谢谢大家:
#!/bin/bash
docker run --name mariadbtest -e MYSQL_ROOT_PASSWORD=mypass -p 3306:3306 -d docker.io/library/mariadb:10.3
sudo apt install mysql-client-core-8.0
mysql -h 172.17.0.2 -u root -p
1条答案
按热度按时间j9per5c41#
最后我用Docker和一个脚本完成了它,它工作得很完美。谢谢大家: