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?

asked Dec 11, 2016 at 6:13
0

1 Answer 1

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.

answered Dec 11, 2016 at 8:13
6
  • Tried --fix-missing and tried update (and upgrade). Nothing worked. Is there an alternative download for MySQL? Commented Dec 12, 2016 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. Commented Dec 12, 2016 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). Commented Dec 12, 2016 at 5:18
  • I tried running apt-get install mysql-server multiple times and still doesn't work! Commented Dec 12, 2016 at 5:24
  • You do realise your comments are not particularly constructive, right? Commented Dec 12, 2016 at 5:25

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.