When I try to install this MySQL for my VPS following the guide on the guide at the website https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/#apt-repo-fresh-install it says this:
root@CrispKnotty-VM:~# apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
gcc-4.8-base:i386
Use 'apt-get autoremove' to remove it.
The following extra packages will be installed:
gcc-7-base gcc-7-base:i386 libaio1 libmecab2 libstdc++6 libstdc++6:i386
mysql-client mysql-community-client mysql-community-server
The following NEW packages will be installed:
gcc-7-base gcc-7-base:i386 libaio1 libmecab2 mysql-client
mysql-community-client mysql-community-server mysql-server
The following packages will be upgraded:
libstdc++6 libstdc++6:i386
2 upgraded, 8 newly installed, 0 to remove and 693 not upgraded.
2 not fully installed or removed.
Need to get 0 B/32.9 MB of archives.
After this operation, 239 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
libaio1 gcc-7-base gcc-7-base:i386 libstdc++6:i386 libstdc++6 libmecab2
Install these packages without verification? [y/N] y
Preconfiguring packages ...
dpkg-deb: error: archive '/var/cache/apt/archives/libaio1_0.3.110-5_amd64.deb' has premature member 'control.tar.xz' before 'control.tar.gz', giving up
dpkg: error processing archive /var/cache/apt/archives/libaio1_0.3.110-5_amd64.deb (--unpack):
subprocess dpkg-deb --control returned error exit status 2
dpkg-deb: error: archive '/var/cache/apt/archives/gcc-7-base_7.2.0-17_amd64.deb' has premature member 'control.tar.xz' before 'control.tar.gz', giving up
dpkg: error processing archive /var/cache/apt/archives/gcc-7-base_7.2.0-17_amd64.deb (--unpack):
subprocess dpkg-deb --control returned error exit status 2
dpkg-deb: error: archive '/var/cache/apt/archives/gcc-7-base_7.2.0-17_i386.deb' has premature member 'control.tar.xz' before 'control.tar.gz', giving up
dpkg: error processing archive /var/cache/apt/archives/gcc-7-base_7.2.0-17_i386.deb (--unpack):
subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/libaio1_0.3.110-5_amd64.deb
/var/cache/apt/archives/gcc-7-base_7.2.0-17_amd64.deb
/var/cache/apt/archives/gcc-7-base_7.2.0-17_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
and I have absolutely no clue what it means or how I can fix it... Sorry. I couldn't find this anywhere I searched.
EDIT: Tried this solution, no luck:
root@CrispKnotty-VM:~# apt-get install --reinstall dpkg
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libnuma1
Use 'apt-get autoremove' to remove it.
The following extra packages will be installed:
libdpkg-perl
Suggested packages:
debsig-verify debian-keyring gcc c-compiler binutils bzr
The following packages will be upgraded:
dpkg libdpkg-perl
2 upgraded, 0 newly installed, 0 to remove and 691 not upgraded.
2 not fully installed or removed.
Need to get 0 B/3449 kB of archives.
After this operation, 1311 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
libdpkg-perl dpkg
Install these packages without verification? [y/N] y
dpkg-deb: error: archive '/var/cache/apt/archives/libdpkg-perl_1.19.0.4_all.deb' has premature member 'control.tar.xz' before 'control.tar.gz', giving up
dpkg: error processing archive /var/cache/apt/archives/libdpkg-perl_1.19.0.4_all .deb (--unpack):
subprocess dpkg-deb --control returned error exit status 2
dpkg-deb: error: archive '/var/cache/apt/archives/dpkg_1.19.0.4_amd64.deb' has p remature member 'control.tar.xz' before 'control.tar.gz', giving up
dpkg: error processing archive /var/cache/apt/archives/dpkg_1.19.0.4_amd64.deb ( --unpack):
subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/libdpkg-perl_1.19.0.4_all.deb
/var/cache/apt/archives/dpkg_1.19.0.4_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
EDIT: Tried this solution, no luck:
root@CrispKnotty-VM:~# dpkg -i --force-overwrite /var/cache/apt/archives/libaio1_0.3.110-5_amd64.deb
dpkg-deb: error: archive '/var/cache/apt/archives/libaio1_0.3.110-5_amd64.deb' has premature member 'control.tar.xz' before 'control.tar.gz', giving up
dpkg: error processing archive /var/cache/apt/archives/libaio1_0.3.110-5_amd64.deb (--install):
subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/libaio1_0.3.110-5_amd64.deb
dpkg
doesn't seem to like hyphens in filenames. Try manually downloading those.deb
files and replacing the hyphens with underscores. forums.debian.net/viewtopic.php?t=107728#p513503https://askubuntu.com/questions/148383/how-to-resolve-dpkg-error-processing-var-cache-apt-archives-python-apport-2-0
the second answer has worked for me in the past