PDA

View Full Version : phpmyadmin won't uninstall.


Aine
March 8th, 2006, 09:39 PM
Hello all.

I've tried to google it and search here, and I can't figure out my solution.

When I go to remove phpmyadmin, I get an error

E: phpmyadmin: subprocess pre-removal script returned error exit status 127

I tried to do

sudo apt-get clean


apt-get check displays


travis@ubuntuTravis:~$ sudo apt-get check
Reading package lists... Done
Building dependency tree... Done
You might want to run `apt-get -f install' to correct these.
The following packages have unmet dependencies:
phpmyadmin: Depends: apache2 or
httpd
E: Unmet dependencies. Try using -f.
travis@ubuntuTravis:~$


Any help will be appreciated.

Xian
March 8th, 2006, 11:45 PM
You might want to run `apt-get -f install' to correct these.

What is the result of 'apt-get -f install'??

Aine
March 9th, 2006, 12:57 AM
It wants to install apache and apache common...but when I install it then try to uninstall it again, it'll uninstall everything except phpmyadmin giving the same error.

ctucker10
March 10th, 2006, 12:29 PM
You describe the same problem I have. Here's the output when trying to remove phpmyadmin from the command line:

ubuntu@ubuntu:~$ sudo apt-get remove phpmyadmin
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED:
phpmyadmin
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B of archives.
After unpacking 11.1MB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 69926 files and directories currently installed.)
Removing phpmyadmin ...
/var/lib/dpkg/info/phpmyadmin.prerm: line 12: db_get: command not found
dpkg: error processing phpmyadmin (--remove):
subprocess pre-removal script returned error exit status 127
Errors were encountered while processing:
phpmyadmin
E: Sub-process /usr/bin/dpkg returned an error code (1)

I want to install a local webserver with apache2, php4, mysql. phpmyadmin is one of the tools I use to work with mysql databases. Anyway, I was trying to get all this setup yesterday and I screwed up somewhere along the line. I just want to uninstall everything and start from scratch but, phpmyadmin won't uninstall.

Any help is appreciated. Thanks.

ctucker10
March 10th, 2006, 01:02 PM
Ubuntu is my first Debian-based distro and I certainly don't know the intracacies of how the apt-get handles package management but, here's what I did to get phpmyadmin to uninstall.

DISCLAIMER: Use this procedure at your own risk.

I saved a copy of the unedited offending file(script):

cd /var/lib/dpkg/info/

sudo cp phpmyadmin.prerm phpmyadmin.prerm.orig

Then I opened the file in a text editor:

sudo gedit phpmyadmin.prerm

Next, I commented out Line 12 by adding the "#" character to the beginning of the line. Then I saved the file.

Here's the output after my edit session:

ubuntu@ubuntu:~$ sudo apt-get remove phpmyadmin
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED:
phpmyadmin
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B of archives.
After unpacking 11.1MB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 69926 files and directories currently installed.)
Removing phpmyadmin ...

I double checked the sucessful uninstall in Synaptic Package Manager. phpmyadmin is no longer flagged as "broken", it is uninstalled.

maddog39
March 10th, 2006, 05:00 PM
What I highly suggest you do is download a web server package for free. The best one that runs on linux is XAMMP and it pre-installs all these things for you, PHP5, MySQL5, and PHPMyAdmin.

Heres the link to the site/download page.
http://www.apachefriends.org/en/xampp.html

Aine
March 10th, 2006, 05:15 PM
Strangly, Maddog, I've used XAMPP when I was on windows and LAMPP (same thing) when I first switched to Linux. The problem came when I wanted to use LAMPP and the default linux services (apache and mysql) were messing my LAMPP up..so I tried to uninstall them and its what gave me my error.

@Chucky, I will give that a shot through SSH since I'm no where near home, and thanks for the help! :D

Aine
March 11th, 2006, 02:43 AM
Where can I send my love for you?! It worked like a charm..I really want to thank you for helping me with this!!

Boss Happy
March 15th, 2006, 01:58 PM
CTucker,
I just had the same problem and your fix worked beautifully. Thanks!
\\:D/

NoNo_231
March 16th, 2006, 04:19 PM
Thanks, that was really great.

I wanted to use LAMPP too, because I use it only for testing and there is no need to have all the system running all the time, but I once I installed I couldn't unistall it. Maybe this sould be corrected in some next version.

Thanks again ctucker10.

patsissons
March 17th, 2006, 10:30 PM
hmmm not really a fix, more like a hack... but hey, if it gets phpmyadmin uninstalled I'm more than happy. This brings to mind however, whoever is maintaining the phpmyadmin package should really fix this issue in the pre-uninstallation script.

JurB
March 19th, 2006, 12:29 PM
Thanks for the solution!

Burke
March 20th, 2006, 03:21 PM
Yeah, somebody poke Yada with a pointy stick, this prerm is broken ;)

Thank you so much for the hack, it worked perfectly, that has been irritating me for months.

fatsamurai
March 26th, 2006, 06:40 AM
Add my thanks to that list too. Worked a treat!

:-D

scottgrant
March 28th, 2006, 11:13 AM
Thanks all, your fix just saved me too!

I also use XAMPP on my windows box, but wanted to 'get smart' and do it all myself like a real unix techie... And paid the price :-)

Still, nobody said learning would be painless.., so here I go again...