Не удается обновить или удалить mariadb [дубликат]

Я ошибся. Мне пришлось обновить mariadb с 10.0 до 10.2 Так и сделал:

$ sudo apt-get install mariadb-server
Reading package lists... Done Building dependency tree        
Reading state information... Done
You might want to run 'apt-get -f install'
  to correct these: 
The following packages have unmet dependencies: 
   mariadb-client : Depends: mariadb-client-10.0 (=10.0.33+maria-1~trusty) but 10.0.31-0ubuntu0.16.04.2 is to be installed
   mariadb-server : Depends: mariadb-server-10.2 (>=    10.2.7+maria~xenial) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

А затем попытался удалить, поскольку у меня были ошибки:

Reading package lists...Done 
Building dependency tree        
Reading state information... Done 
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
   mariadb-client : Depends: mariadb-client-10.0 (=10.0.33+maria-1~trusty) but 10.0.31-0ubuntu0.16.04.2 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

sudo apt-get -f install дает мне:

Reading package lists... Done 
Building dependency tree        
Reading state information... Done 
Correcting dependencies... Done 
The following additional packages will be installed:   
  mariadb-client-10.0 mariadb-client-core-10.0 mariadb-server-10.0 mariadb-server-core-10.0
Suggested packages:   mailx mariadb-test tinyca
Recommended packages:  libhtml-template-perl 
The following packages will be upgraded:
  mariadb-client-10.0 mariadb-client-core-10.0 mariadb-server-10.0 mariadb-server-core-10.0 
4 upgraded, 0 newly installed, 0 to remove and 26 not upgraded. 
4 not fully installed or removed. 
Need to get 0 B/11,7 MB of archives. 
After this operation, 9709 kB disk space will be freed.
Do you want to continue? [Y/n] y
Preconfiguring packages ... (Reading database ... 304724 files and directories currently installed.)
Preparing to unpack .../mariadb-server-10.0_10.0.33+maria-1~trusty_amd64.deb ...
Unpacking mariadb-server-10.0 (10.0.33+maria-1~trusty) over (10.0.31-0ubuntu0.16.04.2) ...
dpkg: error processing archive /var/cache/apt/archives/mariadb-server-10.0_10.0.33+maria-1~trusty_amd64.deb 
  (--unpack):  trying to overwrite '/usr/share/man/man1/mysql_upgrade.1.gz', which is also in package mariadb-server-core-10.0 10.0.31-0ubuntu0.16.04.2
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
dpkg: regarding .../mariadb-server-core-10.0_10.0.33+maria-1~trusty_amd64.deb containing mariadb-server-core-10.0:
 mariadb-server-10.0 conflicts with mysql-server-core-5.5   mariadb-server-core-10.0
 provides mysql-server-core-5.5 and is to be installed.

dpkg: error processing archive /var/cache/apt/archives/mariadb-server-core-10.0_10.0.33+maria-1~trusty_amd64.deb
  (--unpack):  
conflicting packages - not installing mariadb-server-core-10.0 
dpkg: regarding .../mariadb-client-core-10.0_10.0.33+maria-1~trusty_amd64.deb containing mariadb-client-core-10.0:  
mariadb-client-10.0 conflicts with mysql-client-core-5.5   
mariadb-client-core-10.0 provides mysql-client-core-5.5 and is to be installed.

dpkg: error processing archive /var/cache/apt/archives/mariadb-client-core-10.0_10.0.33+maria-1~trusty_amd64.deb (--unpack):  
conflicting packages - not installing mariadb-client-core-10.0 dpkg: regarding .../mariadb-client-10.0_10.0.33+maria-1~trusty_amd64.deb containing mariadb-client-10.0:  
mariadb-client-core-10.0 conflicts with mysql-client-5.5   
mariadb-client-10.0 provides mysql-client-5.5 and is to be installed.

dpkg: error processing archive /var/cache/apt/archives/mariadb-client-10.0_10.0.33+maria-1~trusty_amd64.deb (--unpack):  
conflicting packages - not installing mariadb-client-10.0 
Processing triggers for man-db (2.7.5-1) ... 
Errors were encountered while processing:  /var/cache/apt/archives/mariadb-server-10.0_10.0.33+maria-1~trusty_amd64.deb 
/var/cache/apt/archives/mariadb-server-core-10.0_10.0.33+maria-1~trusty_amd64.deb
/var/cache/apt/archives/mariadb-client-core-10.0_10.0.33+maria-1~trusty_amd64.deb
/var/cache/apt/archives/mariadb-client-10.0_10.0.33+maria-1~trusty_amd64.deb 
E: Sub-process /usr/bin/dpkg returned an error code (1)

Я Застрял, не могу установить, не могу удалить, не могу обновить.

Что мне делать?


Это дает мне следующее:

You might want to run 'apt-get -f install' to correct these: 
The following packages have unmet dependencies:  libmysqlclient20 : 
Depends: mysql-common (>= 5.5) but it is not going to be installed  mariadb-client : 
Depends: mariadb-client-10.0 (= 10.0.33+maria-1~trusty) but 10.0.31-0ubuntu0.16.04.2 is to be installed  mariadb-common : 
Depends: mysql-common (>= 10.0.33+maria-1~trusty) but it is not going to be installed  mariadb-server : 
Depends: mariadb-server-10.0 (= 10.0.33+maria-1~trusty) but 10.0.31-0ubuntu0.16.04.2 is to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
1
задан 20 November 2017 в 22:12

2 ответа

Похоже, что для пакетов, которые вы хотите установить, доступны более новые версии, которые зависят от тех же более новых версий пакетов, которые уже установлены. Apt не знает, как это исправить, если вы не скажете обновить все эти пакеты:

sudo apt-get update
sudo apt-get dist-upgrade -f
2
ответ дан 20 November 2017 в 22:12


Вы пробовали

sudo service mysql stop

Перед тем, как делать:

sudo apt-get --purge remove "mysql*"

Я пробовал на своем ноутбуке, и он работал.

Обратите внимание, что любые пользовательские конфигурации, добавленные после установки, все еще будут там.

0
ответ дан 20 November 2017 в 22:12

Другие вопросы по тегам:

Похожие вопросы: