IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 系统运维 -> umet dependencies问题处理mysql相关. -> 正文阅读

[系统运维]umet dependencies问题处理mysql相关.

想在服务器上面也安装上NVIDIA-docker,结果上来就报错了.
一.

(base) ouc@ouc-Super-Server:~$ sudo apt install curl
[sudo] password for ouc: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 curl : Depends: libcurl4 (= 7.58.0-2ubuntu3.17) but it is not going to be installed
 mysql-client : Depends: mysql-community-client (= 8.0.29-1ubuntu18.04) but it is not going to be installed
 mysql-community-server : Depends: mysql-community-server-core (= 8.0.29-1ubuntu18.04) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

两个小时还是没有找到解决方案, 决定换个环境.换了之后发现还是一样的问题,我吐了,但是现在不知道怎么回事就好了,我只能记录下可能有用的步骤.

  1. sudo apt-get install -fsudo apt --fix-broken installsudo apt -f install这三个命令都尝试过,其作用应该是一样的,但是都会报如下错误
dpkg: error processing archive /var/cache/apt/archives/mysql-community-client_8.0.29-1ubuntu18.04_amd64.deb (--unpack):
 trying to overwrite '/usr/share/mysql-8.0/charsets/Index.xml', which is also in package mysql-community-common 8.0.26-2
Preparing to unpack .../mysql-community-server-core_8.0.29-1ubuntu18.04_amd64.deb ...
Unpacking mysql-community-server-core (8.0.29-1ubuntu18.04) ...
dpkg: error processing archive /var/cache/apt/archives/mysql-community-server-core_8.0.29-1ubuntu18.04_amd64.deb (--unpack):
 trying to overwrite '/usr/share/mysql-8.0/bulgarian/errmsg.sys', which is also in package mysql-community-common 8.0.26-2
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-community-client_8.0.29-1ubuntu18.04_amd64.deb
 /var/cache/apt/archives/mysql-community-server-core_8.0.29-1ubuntu18.04_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

这个问题虽然现在解决了,但还是并不清除是如何解决的,还是会显示有关mysql的警告,但毕竟可以安装了。

针对上面这个错误,即E: Sub-process /usr/bin/dpkg returned an error code (1),我最后参考了这里的指导,其中主要是如下两个步骤,
(1)

(base) ouc@ouc-Super-Server:~$ sudo ls -l /var/lib/dpkg/info/ | grep -i 'mysql-*'
-rwxr-xr-x 1 root root    7402 1216 17:42 mysql-apt-config.config
-rw-r--r-- 1 root root     242 54 16:01 mysql-apt-config.list
-rw-r--r-- 1 root root     308 54 16:01 mysql-apt-config.md5sums
-rwxr-xr-x 1 root root    6252 1216 17:42 mysql-apt-config.postinst
-rwxr-xr-x 1 root root     975 1216 17:42 mysql-apt-config.postrm
-rw-r--r-- 1 root root    3124 1216 17:42 mysql-apt-config.templates
-rw-r--r-- 1 root root     312 53 14:27 mysql-client.list
-rw-r--r-- 1 root root     367 323 22:26 mysql-client.md5sums
-rw-r--r-- 1 root root      55 323 22:26 mysql-common.conffiles
-rw-r--r-- 1 root root     518 53 14:27 mysql-common.list

(2)

(base) ouc@ouc-Super-Server:~$ sudo rm -r /var/lib/dpkg/info/mysql-*

当我按照它的这么步骤做完之后,我再次尝试安装curl,结果还是失败的。

(base) ouc@ouc-Super-Server:~$ sudo apt install curl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 curl : Depends: libcurl4 (= 7.58.0-2ubuntu3.17) but it is not going to be installed
 mysql-client : Depends: mysql-community-client (= 8.0.29-1ubuntu18.04) but it is not going to be installed
 mysql-community-server : Depends: mysql-community-server-core (= 8.0.29-1ubuntu18.04) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

然后我对服务器重启了一次,切换了一个用户,还是会发生相同的错误,

(base) ouc@ouc-Super-Server:~$ sudo reboot
Connection to ×××.195.146.××× closed by remote host.
Connection to ×××.195.146.××× closed.

(base) wlj@wlj-OUC:~$ ssh li@×××.195.146.×××
li@×××.195.146.×××'s password: 
Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-74-generic x86_64)
li@ouc-Super-Server:/$ sudo apt-get install -y \
>     apt-transport-https \
>     ca-certificates \
>     curl \
>     gnupg-agent \
>     software-properties-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 curl : Depends: libcurl4 (= 7.58.0-2ubuntu3.17) but it is not going to be installed
 gnupg-agent : Depends: gpg-agent (>= 2.2.4-1ubuntu1.4)
 gnupg2 : Depends: gnupg-agent (= 2.1.11-6ubuntu2.1)
 mysql-client : Depends: mysql-community-client (= 8.0.29-1ubuntu18.04) but it is not going to be installed
 mysql-community-server : Depends: mysql-community-server-core (= 8.0.29-1ubuntu18.04) but it is not going to be installed
 software-properties-common : Depends: python3-software-properties (= 0.96.24.32.18) but 0.96.20.8 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

然后我又切换成了原用户,再次使用sudo apt -f install, 这次Error变成了warning,可以正常执行了。

(base) ouc@ouc-Super-Server:~$ sudo apt -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  mysql-community-client mysql-community-server-core
The following NEW packages will be installed:
  mysql-community-client mysql-community-server-core
0 upgraded, 2 newly installed, 0 to remove and 470 not upgraded.
4 not fully installed or removed.
Need to get 26.4 MB of archives.
After this operation, 195 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.29-1ubuntu18.04 [2,922 kB]
Get:2 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-server-core amd64 8.0.29-1ubuntu18.04 [23.5 MB]
Fetched 26.4 MB in 15s (1,776 kB/s)                                                                 
dpkg: warning: files list file for package 'mysql-community-libs' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-common' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-community-libs-compat' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-community-client-core' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-community-client-plugins' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-apt-config' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-community-common' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-community-devel' missing; assuming package has no files currently installed
(Reading database ... 250303 files and directories currently installed.)
Preparing to unpack .../mysql-community-client_8.0.29-1ubuntu18.04_amd64.deb ...
Unpacking mysql-community-client (8.0.29-1ubuntu18.04) ...
Preparing to unpack .../mysql-community-server-core_8.0.29-1ubuntu18.04_amd64.deb ...
Unpacking mysql-community-server-core (8.0.29-1ubuntu18.04) ...
Setting up mysql-common (8.0.29-1ubuntu18.04) ...
Setting up mysql-community-server-core (8.0.29-1ubuntu18.04) ...
Setting up mysql-community-client (8.0.29-1ubuntu18.04) ...
Setting up mysql-client (8.0.29-1ubuntu18.04) ...
Setting up mysql-community-server (8.0.29-1ubuntu18.04) ...
Setting up mysql-server (8.0.29-1ubuntu18.04) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.27-3ubuntu1.4) ...
W: APT had planned for dpkg to do more than it reported back (19 vs 23).
   Affected packages: mysql-common:amd64

但是mysql依然是不能运行的,

(base) ouc@ouc-Super-Server:~$ systemctl status mysql
Unit mysql.service could not be found.

不过可以安装curl了,目的也算是达到了,mysql 的警告就暂时不管了。感觉应该和重启有一定的关系,但是没有什么依据。

(base) ouc@ouc-Super-Server:~$ sudo apt-get install -y curl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libcurl4
The following packages will be REMOVED:
  libcurl3
The following NEW packages will be installed:
  curl libcurl4
0 upgraded, 2 newly installed, 1 to remove and 469 not upgraded.
Need to get 379 kB of archives.
After this operation, 487 kB of additional disk space will be used.
Get:1 http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 libcurl4 amd64 7.58.0-2ubuntu3.17 [220 kB]
Get:2 http://mirrors.aliyun.com/ubuntu bionic-security/main amd64 curl amd64 7.58.0-2ubuntu3.17 [159 kB]
Fetched 379 kB in 6s (65.5 kB/s)
dpkg: warning: files list file for package 'mysql-server' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-community-libs' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-common' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-client' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-community-libs-compat' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-community-client-core' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-community-client-plugins' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-apt-config' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-community-common' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-community-devel' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-community-server' missing; assuming package has no files currently installed
(Reading database ... 250515 files and directories currently installed.)
Removing libcurl3:amd64 (7.47.0-1ubuntu2.14) ...
Selecting previously unselected package libcurl4:amd64.
dpkg: warning: files list file for package 'mysql-server' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-community-libs' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-common' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-client' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-community-libs-compat' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-community-client-core' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-community-client-plugins' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-apt-config' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-community-common' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-community-devel' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'mysql-community-server' missing; assuming package has no files currently installed
(Reading database ... 250508 files and directories currently installed.)
Preparing to unpack .../libcurl4_7.58.0-2ubuntu3.17_amd64.deb ...
Unpacking libcurl4:amd64 (7.58.0-2ubuntu3.17) ...
Selecting previously unselected package curl.
Preparing to unpack .../curl_7.58.0-2ubuntu3.17_amd64.deb ...
Unpacking curl (7.58.0-2ubuntu3.17) ...
Setting up libcurl4:amd64 (7.58.0-2ubuntu3.17) ...
Setting up curl (7.58.0-2ubuntu3.17) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.27-3ubuntu1.4) ...

两个小时,就搞了这么一件事情。

  系统运维 最新文章
配置小型公司网络WLAN基本业务(AC通过三层
如何在交付运维过程中建立风险底线意识,提
快速传输大文件,怎么通过网络传大文件给对
从游戏服务端角度分析移动同步(状态同步)
MySQL使用MyCat实现分库分表
如何用DWDM射频光纤技术实现200公里外的站点
国内顺畅下载k8s.gcr.io的镜像
自动化测试appium
ctfshow ssrf
Linux操作系统学习之实用指令(Centos7/8均
上一篇文章      下一篇文章      查看所有文章
加:2022-05-05 12:01:58  更:2022-05-05 12:02:53 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年11日历 -2024/11/15 17:45:10-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码