请指导我。

请指导我。

我尝试使用以下命令在 ubuntu 18.04 上安装 mysql:

$ sudo apt install mysql-server

我收到消息:

dpkg: 处理软件包 mysql-server 时出错(依赖性问题)

我按照以下步骤进行操作:

dpkg: 错误处理

我做到了:

sudo apt-get purge mysql*
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get dist-upgrade

现在我收到消息:

Processing triggers for initramfs-tools (0.130ubuntu3.13) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-167-generic
Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

请有人指导我。

==2022 年 2 月 12 日更新

$ sudo apt --fix-broken install
> Reading package lists... Done Building dependency tree        Reading
> state information... Done The following packages were automatically
> installed and are no longer required:   cuda-command-line-tools-10-1
> cuda-command-line-tools-11-2 cuda-compiler-10-1   cuda-compiler-11-2
> cuda-cudart-10-1 cuda-cudart-11-2 cuda-cudart-dev-10-1  
> cuda-cudart-dev-11-2 cuda-cufft-10-1 cuda-cufft-dev-10-1
> cuda-cuobjdump-10-1   cuda-cuobjdump-11-2 cuda-cupti-10-1
> cuda-cupti-11-2 cuda-cupti-dev-11-2   cuda-curand-10-1
> cuda-curand-dev-10-1 cuda-cusolver-10-1   cuda-cusolver-dev-10-1
> cuda-cusparse-10-1 cuda-cusparse-dev-10-1   cuda-cuxxfilt-11-2
> cuda-documentation-10-1 cuda-documentation-11-2   cuda-driver-dev-10-1
> cuda-driver-dev-11-2 cuda-drivers-460 cuda-gdb-10-1   cuda-gdb-11-2
> cuda-gpu-library-advisor-10-1 cuda-libraries-10-1  
> cuda-libraries-11-2 cuda-libraries-dev-10-1 cuda-libraries-dev-11-2  
> cuda-license-10-1 cuda-memcheck-10-1 cuda-memcheck-11-2  
> cuda-misc-headers-10-1 cuda-npp-10-1 cuda-npp-dev-10-1
> cuda-nsight-10-1   cuda-nsight-11-2 cuda-nsight-compute-10-1
> cuda-nsight-compute-11-2   cuda-nsight-systems-10-1
> cuda-nsight-systems-11-2 cuda-nvcc-10-1   cuda-nvcc-11-2
> cuda-nvdisasm-10-1 cuda-nvdisasm-11-2 cuda-nvgraph-10-1  
> cuda-nvgraph-dev-10-1 cuda-nvjpeg-10-1 cuda-nvjpeg-dev-10-1  
> cuda-nvml-dev-10-1 cuda-nvml-dev-11-2 cuda-nvprof-10-1
> cuda-nvprof-11-2   cuda-nvprune-10-1 cuda-nvprune-11-2 cuda-nvrtc-10-1
> cuda-nvrtc-11-2   cuda-nvrtc-dev-10-1 cuda-nvrtc-dev-11-2
> cuda-nvtx-10-1 cuda-nvtx-11-2   cuda-nvvp-10-1 cuda-nvvp-11-2
> cuda-samples-10-1 cuda-samples-11-2   cuda-sanitizer-11-2
> cuda-sanitizer-api-10-1 cuda-toolkit-10-1   cuda-toolkit-11-2
> cuda-tools-10-1 cuda-tools-11-2 cuda-visual-tools-10-1  
> cuda-visual-tools-11-2 freeglut3 freeglut3-dev libcublas-11-2
> libcublas-dev   libcublas-dev-11-2 libcublas10 libcufft-11-2
> libcufft-dev-11-2   libcurand-11-2 libcurand-dev-11-2 libcusolver-11-2
> libcusolver-dev-11-2   libcusparse-11-2 libcusparse-dev-11-2
> libnpp-11-2 libnpp-dev-11-2   libnvidia-cfg1-460 libnvidia-common-460
> libnvidia-compute-460   libnvidia-decode-460 libnvidia-encode-460
> libnvidia-extra-460   libnvidia-fbc1-460 libnvidia-gl-460
> libnvidia-ifr1-460 libnvjpeg-11-2   libnvjpeg-dev-11-2
> libqt5positioning5 libqt5sensors5 libqt5webchannel5   libqt5webkit5
> libxi-dev libxmu-dev libxmu-headers linux-headers-4.15.0-143  
> linux-headers-4.15.0-143-generic linux-modules-4.15.0-143-generic  
> nsight-compute-2020.3.0 nsight-compute-2020.3.1
> nsight-compute-2022.1.0   nsight-systems-2020.4.3
> nsight-systems-2021.5.2 nvidia-compute-utils-460   nvidia-dkms-460
> nvidia-kernel-common-460 nvidia-kernel-source-460   nvidia-modprobe
> nvidia-utils-460 qml-module-qtgraphicaleffects  
> qml-module-qtquick-controls qml-module-qtquick-dialogs  
> qml-module-qtquick-layouts qml-module-qtquick-privatewidgets  
> qml-module-qtquick-window2 qml-module-qtquick2 shim  
> xserver-xorg-video-nvidia-460 Use 'sudo apt autoremove' to remove
> them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 2
> not fully installed or removed. After this operation, 0 B of
> additional disk space will be used. Setting up mysql-server-5.7
> (5.7.37-0ubuntu0.18.04.1) ...
> /var/lib/dpkg/info/mysql-server-5.7.postinst: line 206:
> /usr/share/mysql-common/configure-symlinks: No such file or directory
> dpkg: error processing package mysql-server-5.7 (--configure): 
> installed mysql-server-5.7 package post-installation script subprocess
> returned error exit status 127 No apport report written because the
> error message indicates its a followup error from a previous failure.
>                           dpkg: dependency problems prevent configuration of mysql-server:  mysql-server depends on
> mysql-server-5.7; however:   Package mysql-server-5.7 is not
> configured yet.
> 
> dpkg: error processing package mysql-server (--configure):  dependency
> problems - leaving unconfigured Errors were encountered while
> processing:  mysql-server-5.7  mysql-server E: Sub-process
> /usr/bin/dpkg returned an error code (1) zulfi@lc2530hz:~$

==错误信息:

你好,

我试过:

$ sudo apt dist-upgrade

我收到以下消息:

> Setting up mysql-server-5.7 (5.7.37-0ubuntu0.18.04.1) ...
> /var/lib/dpkg/info/mysql-server-5.7.postinst: line 206:
> /usr/share/mysql-common/configure-symlinks: No such file or directory
> dpkg: error processing package mysql-server-5.7 (--configure): 
> installed mysql-server-5.7 package post-installation script subprocess
> returned error exit status 127 dpkg: dependency problems prevent
> configuration of mysql-server:  mysql-server depends on
> mysql-server-5.7; however:   Package mysql-server-5.7 is not
> configured yet.
> 
> dpkg: error processing package mysql-server (--configure):  dependency
> problems - leaving unconfigured No apport report written because the
> error message indicates its a followup error from a previous failure.
>                                                                                                           Errors were encountered while processing:  mysql-server-5.7 
> mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1)

然后我尝试:

$ sudo apt install mysql-server-5.7
> Setting up mysql-server-5.7 (5.7.37-0ubuntu0.18.04.1) ...
> /var/lib/dpkg/info/mysql-server-5.7.postinst: line 206:
> /usr/share/mysql-common/configure-symlinks: No such file or directory
> dpkg: error processing package mysql-server-5.7 (--configure): 
> installed mysql-server-5.7 package post-installation script subprocess
> returned error exit status 127 dpkg: dependency problems prevent
> configuration of mysql-server:  mysql-server depends on
> mysql-server-5.7; however:   Package mysql-server-5.7 is not
> configured yet.
> 
> dpkg: error processing package mysql-server (--configure):  dependency
> problems - leaving unconfigured No apport report written because the
> error message indicates its a followup error from a previous failure.
>                                                                                                           Errors were encountered while processing:  mysql-server-5.7 
> mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1)

请指导我。

〜$ lsb_release-d

描述:Ubuntu 18.04.6 LTS

$ sudo apt update

[sudo] zulfi 的密码:Ign:1 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 发行量:2https://download.docker.com/linux/ubuntubionic 发布
热度:3https://dl.yarnpkg.com/debian稳定发布
Ign:4 http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 发布中
获取:5https://download.docker.com/linux/debianbuster InRelease [54.0 kB]
点击数:6 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 发布
次数:7 http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 发布
次数:8https://linux.teamviewer.com/deb稳定发布
获取:9http://security.ubuntu.com/ubuntubionic-security InRelease [88.7 kB]
点击数:10http://ppa.launchpad.net/deadsnakes/ppa/ubuntubionic 发布热度:12http://us.archive.ubuntu.com/ubuntubionic 正在发布
获取:13http://us.archive.ubuntu.com/ubuntubionic-updates InRelease [88.7 kB]
点击数:15http://ppa.launchpad.net/ethereum/ethereum/ubuntubionic 正在发布
获取:16http://us.archive.ubuntu.com/ubuntubionic-backports InRelease [74.6 kB]
获取:17http://security.ubuntu.com/ubuntubionic-security/main amd64 DEP-11 元数据 [55.3 kB]
点击数:18http://ppa.launchpad.net/graphics-drivers/ppa/ubuntubionic 正在发布 获取:19 http://security.ubuntu.com/ubuntubionic-security/universe amd64 DEP-11 元数据 [59.4 kB]
获取:20http://us.archive.ubuntu.com/ubuntubionic-updates/main amd64 DEP-11 元数据 [296 kB]
获取:21http://security.ubuntu.com/ubuntubionic-security/multiverse amd64 DEP-11 元数据 [2,460 B]
点击数:22 http://ppa.launchpad.net/maarten-baert/simplescreenrecorder/ubuntu bionic 正在发布
获取:23http://us.archive.ubuntu.com/ubuntubionic-updates/universe amd64 DEP-11 元数据 [301 kB]
获取:24http://us.archive.ubuntu.com/ubuntubionic-updates/multiverse amd64 DEP-11 元数据 [2,464 B]
获取:25http://us.archive.ubuntu.com/ubuntubionic-backports/universe amd64 DEP-11 元数据 [9,268 B] 点击数:26 http://ppa.launchpad.net/wireshark-dev/stable/ubuntubionic 发布 Ign:27http://download.virtualbox.org/virtualbox/debian18.04 发布中错误:28http://download.virtualbox.org/virtualbox/debian 18.04 Release 404 未找到 [IP: 173.222.52.87 80] 正在读取软件包列表... 完成 E: 存储库 'http://download.virtualbox.org/virtualbox/debian 18.04 Release' 没有 Release 文件。N: 从这样的存储库进行更新无法安全地完成,因此默认情况下被禁用。N: 有关存储库创建和用户配置的详细信息,请参阅 apt-secure(8) 手册页。@lc2530hz:~$

相关内容