0

When trying to install MySQL with the Bash command line using apt-get install it does not work.

root@raspberrypi:~# apt-get install mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mysql
root@raspberrypi:~# clear
root@raspberrypi:~# apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
  libterm-readkey-perl mysql-client-5.5 mysql-common mysql-server-5.5
  mysql-server-core-5.5
Suggested packages:
  libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl
  libipc-sharedcache-perl mailx tinyca
The following NEW packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
  libterm-readkey-perl mysql-client-5.5 mysql-common mysql-server
  mysql-server-5.5 mysql-server-core-5.5
0 upgraded, 11 newly installed, 0 to remove and 50 not upgraded.
Need to get 7,283 kB/8,305 kB of archives.
After this operation, 89.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Err http://mirrordirector.raspbian.org/raspbian/ jessie/main mysql-common all 5.5.52-0+deb8u1
  404  Not Found [IP: 5.153.225.207 80]
Err http://mirrordirector.raspbian.org/raspbian/ jessie/main libmysqlclient18 armhf 5.5.52-0+deb8u1
  404  Not Found [IP: 5.153.225.207 80]
Err http://mirrordirector.raspbian.org/raspbian/ jessie/main mysql-client-5.5 armhf 5.5.52-0+deb8u1
  404  Not Found [IP: 5.153.225.207 80]
Err http://mirrordirector.raspbian.org/raspbian/ jessie/main mysql-server-core-5.5 armhf 5.5.52-0+deb8u1
  404  Not Found [IP: 5.153.225.207 80]
Err http://mirrordirector.raspbian.org/raspbian/ jessie/main mysql-server-5.5 armhf 5.5.52-0+deb8u1
  404  Not Found [IP: 5.153.225.207 80]
Err http://mirrordirector.raspbian.org/raspbian/ jessie/main mysql-server all 5.5.52-0+deb8u1
  404  Not Found [IP: 5.153.225.207 80]
E: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/m/mysql-5.5/mysql-common_5.5.52-0+deb8u1_all.deb  404  Not Found [IP: 5.153.225.207 80]

E: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/m/mysql-5.5/libmysqlclient18_5.5.52-0+deb8u1_armhf.deb  404  Not Found [IP: 5.153.225.207 80]

E: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/m/mysql-5.5/mysql-client-5.5_5.5.52-0+deb8u1_armhf.deb  404  Not Found [IP: 5.153.225.207 80]

E: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/m/mysql-5.5/mysql-server-core-5.5_5.5.52-0+deb8u1_armhf.deb  404  Not Found [IP: 5.153.225.207 80]

E: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/m/mysql-5.5/mysql-server-5.5_5.5.52-0+deb8u1_armhf.deb  404  Not Found [IP: 5.153.225.207 80]

E: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/m/mysql-5.5/mysql-server_5.5.52-0+deb8u1_all.deb  404  Not Found [IP: 5.153.225.207 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Edit: Tried --fix-missing and tried update (and upgrade). Nothing worked. Is there an alternative download for MySQL?

1

You need to literally follow the suggestion given in the error message (ephasis below):

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

So still staying logged on as root execute:

root@raspberrypi:~# apt-get update
root@raspberrypi:~# apt-get install mysql-server

This time APT will fetch version 5.5.53 instead of the 5.5.52 removed from the repository.

As a general rule, you should always use apt-get update before installing packages.

  • Tried --fix-missing and tried update (and upgrade). Nothing worked. Is there an alternative download for MySQL? – Miles FM Dec 12 '16 at 5:14
  • That's strange because I tested on a fresh Raspbian, got the same error as you, ran apt-get update and the problem was resolved on next apt-get install mysql-server. – techraf Dec 12 '16 at 5:16
  • You don't need any alternative download, you just need to ask for the correct files. You've got everything on your screen - navigate to mirrordirector.raspbian.org/raspbian/pool/main/m/mysql-5.5 with your browser and you will see the packages (in 5.5.53 version). – techraf Dec 12 '16 at 5:18
  • I tried running apt-get install mysql-server multiple times and still doesn't work! – Miles FM Dec 12 '16 at 5:24
  • You do realise your comments are not particularly constructive, right? – techraf Dec 12 '16 at 5:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.