1

I'm trying to install mysql-server package using sudo apt-get install mysql-server on my Raspberry Pi (Raspbian Jessie), but I encounter the following error :

dpkg: error processing archive /var/cache/apt/archives/mysql-server-5.5_5.5.44-0+deb8u1_armhf.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
[...]
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-server-5.5_5.5.44-0+deb8u1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Then I did sudo apt-get remove mysql-server + sudo apt-get autoremove. I tried to rerun sudo apt-get install mysql-server but got the same error.

So I tried sudo apt-get clean and sudo apt-get autoclean but still have the same error when trying to install mysql-server.

Does somebody encounter the same problem and found a solution ?

Thank you !

2

Good Afternoon. English is not my native language so please be patient.

I think your problem is with dpkg and not with MySql.

Try this: sudo apt-get -f install

And then: sudo apt-get autoclean && sudo apt-get autoremove

For last the classic: sudo apt-get update && sudo apt-get upgrade

That will fix dpkg. If -f install doesn't work try this:

sudo dpkg --configure -a

Hope this answer helps.

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.