After reinstalling mysql, I get an error when installing any software
Reading package lists... Done Building dependency tree... Done Reading state information... Done wget is already the newest version (1.21.2-2ubuntu1). 0 upgraded, 0 newly installed, 0 to remove and 43 not upgraded. 2 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y Setting up mysql-server-8.0 (8.0.30-0ubuntu0.22.04.1) ... Renaming removed key_buffer and myisam-recover options (if present) Specified filename /var/lib/mysql/ibdata1 does not exist. mysqld will log errors to /var/log/mysql/error.log 2022-09-02T07:28:00.496933Z 0 [ERROR] [MY-010946] [Server] Failed to start mysqld daemon. Check mysqld error log. Warning: Unable to start the server. AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in profile /etc/apparmor.d/usr.sbin.mysqld at line 9: Could not open 'abstractions/mysql' Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xeu mysql.service" for details. invoke-rc.d: initscript mysql, action "start" failed. ● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Fri 2022-09-02 15:28:00 CST; 3ms ago Process: 15388 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=1/FAILURE) CPU: 6ms dpkg: error processing package mysql-server-8.0 (--configure): installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1 dpkg: dependency problems prevent configuration of mysql-server: mysql-server depends on mysql-server-8.0; however: Package mysql-server-8.0 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-8.0 mysql-server E: Sub-process /usr/bin/dpkg returned an error code (1)
Solution:
ls -l /var/lib/dpkg/info | grep -i mysql-server -rw-r--r-- 1 root root 363 Jul 27 00:14 mysql-server-8.0.conffiles -rwxr-xr-x 1 root root 1504 Jul 27 00:14 mysql-server-8.0.config -rw-r--r-- 1 root root 1604 Aug 31 19:00 mysql-server-8.0.list -rw-r--r-- 1 root root 1112 Jul 27 00:14 mysql-server-8.0.md5sums -rwxr-xr-x 1 root root 17135 Jul 27 00:14 mysql-server-8.0.postinst -rwxr-xr-x 1 root root 3873 Jul 27 00:14 mysql-server-8.0.postrm -rwxr-xr-x 1 root root 5631 Jul 27 00:14 mysql-server-8.0.preinst -rwxr-xr-x 1 root root 403 Jul 27 00:14 mysql-server-8.0.prerm -rw-r--r-- 1 root root 21907 Jul 27 00:14 mysql-server-8.0.templates -rw-r--r-- 1 root root 5232 Aug 31 19:00 mysql-server-core-8.0.list -rw-r--r-- 1 root root 8318 Jul 27 00:14 mysql-server-core-8.0.md5sums
mv /var/lib/dpkg/info/mysql-* /tmp apt-get update
Read More:
- Ubuntu sub process/usr/bin/dpkg returned an error code (1) solution
- How to Fix Linux sub process /usr/bin/dpkg returned an error code (1)
- Ubuntu Error: dpkg: error processing package mysql-community-server (–configure):
- [Ubuntu] How to Solve dpkg Error: dpkg: error: failed to open package info file ‘/usr/local/var/lib/dpkg/status’ for reading: No such file or directory
- [Solved] E Sub-process usrbindpkg returned an error code (1)
- AFTER THE GIT SOURCE CODE IS INSTALLED, AN ERROR IS REPORTED /USR/BIN/GIT: NO SUCH FILE OR DIRECTORY
- [Solved] /usr/bin/ld: cannot find crti.o: No such file or directory & /usr/bin/ld: cannot find -lc
- ubuntu install package Error: subprocess installed post-installation script returned error exit status 10
- [problem solving] the problem of err returned non zero status 1 or status 2 is solved after upgrading python3 in Ubuntu
- [Solved] Linux program error: dpkg is interrupted. You must manually run ‘sudo dpkg — configure – a’
- [Solved] Linux error E: dpkg is broken, you must manually run ‘sudo dpkg –configure -a’ to resolve this issue
- The upgrade of Ubuntu results in an error in the compilation of Android Jack [Two Method to Solve]
- Install and start the tftp-server server and possible solutions to Redirecting to /bin/systemctl restart xinetd.service problems
- [Solved] Ubuntu Terminal Error: subprocess installed post-installation script returned error exit status 1
- /usr/bin/ssh-copy-id: ERROR: No identities found [How to Solve]
- mysqlclient in Ubuntu: How to Solve mysqlclient Install Error
- Ubuntu20.04 install the ROS noetic version in catkin_Problems in make compilation
- How to Solve Xmind Install Error in Ubuntu System
- [Solved] dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
- [Solved] OCI runtime create failed: /usr/bin/nvidia-container-runtime did not terminate successfully: unknown