0

I'm running a lighttpd web server on my Pi and I'm trying to add php and mysql support. I'm currently trying to install mysql-server with the command

'sudo apt-get install mysql-server'

which results in the following error:

[my user name]@raspberrypi:~ $ sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libaio1 libhtml-template-perl mysql-server-5.5 mysql-server-core-5.5
Suggested packages:
  libipc-sharedcache-perl mailx tinyca
The following NEW packages will be installed:
  libaio1 libhtml-template-perl mysql-server mysql-server-5.5
  mysql-server-core-5.5
0 upgraded, 5 newly installed, 0 to remove and 15 not upgraded.
Need to get 0 B/4,938 kB of archives.
After this operation, 46.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
  libaio1 mysql-server-core-5.5 mysql-server-5.5 libhtml-template-perl
  mysql-server
Install these packages without verification? [y/N] y
Preconfiguring packages ...
Selecting previously unselected package libaio1:armhf.
(Reading database ... 121517 files and directories currently installed.)
Preparing to unpack .../libaio1_0.3.110-1_armhf.deb ...
Unpacking libaio1:armhf (0.3.110-1) ...
Selecting previously unselected package mysql-server-core-5.5.
Preparing to unpack .../mysql-server-core-5.5_5.5.52-0+deb8u1_armhf.deb ...
Unpacking mysql-server-core-5.5 (5.5.52-0+deb8u1) ...
Preparing to unpack .../mysql-server-5.5_5.5.52-0+deb8u1_armhf.deb ...
Aborting downgrade from (at least) 10.0 to 5.5.
If are sure you want to downgrade to 5.5, remove the file
/var/lib/mysql/debian-*.flag and try installing again.
dpkg: error processing archive /var/cache/apt/archives/mysql-server-5.5_5.5.52-0+deb8u1_armhf.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Selecting previously unselected package libhtml-template-perl.
Preparing to unpack .../libhtml-template-perl_2.95-1_all.deb ...
Unpacking libhtml-template-perl (2.95-1) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.5.52-0+deb8u1_all.deb ...
Unpacking mysql-server (5.5.52-0+deb8u1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-server-5.5_5.5.52-0+deb8u1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I know the same problem was reported here: Raspberry PI 2: Installing mysql-server

But the solution in that case seemed to be enabling the loopback interface. In my case, the loopback interface is working fine but that doesn't solve my problem.

ifconfig output:

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1096 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1096 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:91408 (89.2 KiB)  TX bytes:91408 (89.2 KiB)

I tried the following commands, repeatedly, with no result:

'sudo apt-get -f install'

'sudo apt-get autoremove'

'sudo apt-get autoclean'

'sudo apt-get update'

'sudo apt-get upgrade'

'sudo dpkg --configure -a'

  • It may be the insufficient space problem on your SD card. – vaha Nov 2 '16 at 20:40
  • Please provide the contents of your `/etc/apt/sources.list' file. – Hydraxan14 Apr 20 '17 at 16:55
1

Key Authentication and Downgrade

You have two concerning error messages:

WARNING: The following packages cannot be authenticated!

and

Preparing to unpack .../mysql-server-5.5_5.5.52-0+deb8u1_armhf.deb ...
Aborting downgrade from (at least) 10.0 to 5.5.
If are sure you want to downgrade to 5.5, remove the file
/var/lib/mysql/debian-*.flag and try installing again.
dpkg: error processing archive /var/cache/apt/archives/mysql-server-5.5_5.5.52-0+deb8u1_armhf.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1

The first message indicates that the key used to sign those packages are not on your keyring. This is a bit mysterious and indicates possible issues with your repository configuration.

The second message indicates that you already have a newer version of mysql-server installed, and that it conflicts with the older version, so they can't both be installed at the same time. You'll have to uninstall the newer version first.

I believe that version 10.0 is the mariadb version of mysql, whereas 5.5 is the older mysql version of mysql.

0

Can you try apt-key update as mentioned here followed by sudo apt-get install mysql-server ?

  • Here is the output: [username]@raspberrypi:~ $ sudo apt-key update [sudo] password for [username]: ERROR: Can't find the archive-keyring Is the debian-archive-keyring package installed? – Danesan Dragos Sep 29 '16 at 9:48

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.