[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Sarge NR_CPUS limit of 1 reached. Processor ignored.



Siju George wrote:

but I faced a problem removing mysql-server. Details below.
How can you remove all installed packages with their configs ( Purge)
and get back the original base system???

I cannot do a re-install cause the server is not near by :-(

Thankyou so much :-)

kind regards

Siju


Sorry, Forgot to give the details in previous mail :-(

------------------
# dpkg -P mysql-server-5.0
(Reading database ... 30784 files and directories currently installed.)
Removing mysql-server-5.0 ...
Stopping MySQL database server: mysqld.
Purging configuration files for mysql-server-5.0 ...
rm: cannot remove directory `/var/lib/mysql': Device or resource busy
Is /var/lib/mysql the working directory (of your shell,
or some other process) when you try?  Make sure
that is not the case. "cd" away from it.

Is this a mountpoint? (Unlikely but possible)
Is mysql running?  A broken "remove" script may
fail to stop it properly first - if so stop/kill mysql yourself
before attempting removal.

Is there something else in the directory?
Have a look.  If you don't find anything worth having, what
happens if you do a "rm -r var/lib/mysql/*" as root?

If weird things happen, go single-user, umount /var, and
use fsck.  If /var is part of the root fs, run that fsck from
a cd-boot or boot into single-user, mount read-only, run
fsck, then boot.

Try removing the package again after emptying the directory
manually.  You may also want to try

dpkg --force-all -P mysql-server-5.0

But take the warnings seriously if you do so.

dpkg: error processing mysql-server-5.0 (--purge):
subprocess post-removal script returned error exit status 1
Errors were encountered while processing:
mysql-server-5.0
oss40:/var/cache/apt/archives# man dpkg
Reformatting dpkg(8), please wait...
oss40:/var/cache/apt/archives# apt-get install mysql-server-5.0
Reading Package Lists... Done
Building Dependency Tree... Done
mysql-server-5.0 is already the newest version.
If you want to simply reinstall the package (someone deleted
an important file?) then do:

apt-get install --reinstall mysql-server-5.0

This should overwrite all existing files. Another option
is to use: dpkg -i package-file.deb
After an apt-get run, you'll find the .deb file in
/var/cache/apt/archives

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
oss40:/var/cache/apt/archives# apt-get remove --purge mysql-server-5.0
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages will be REMOVED:
 mysql-server-5.0*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B of archives.
After unpacking 40.9MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 30626 files and directories currently installed.)
Removing mysql-server-5.0 ...
Purging configuration files for mysql-server-5.0 ...
rm: cannot remove directory `/var/lib/mysql': Device or resource busy
dpkg: error processing mysql-server-5.0 (--purge):
subprocess post-removal script returned error exit status 1
Errors were encountered while processing:
mysql-server-5.0
E: Sub-process /usr/bin/dpkg returned an error code (1)
As a last resort, consider using
dpkg -L mysql-server-5.0
to see what files this package consist of, then remove them manually.
Or pipe the output of the above command into some form of "| xargs rm"

Consider using "reportbug" to report the problems with this package.

Helge Hafting



Reply to: