LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   removepkg problem - cutoff folder names (https://www.linuxquestions.org/questions/slackware-14/removepkg-problem-cutoff-folder-names-696344/)

hellbillyJoker 01-10-2009 11:57 AM

removepkg problem - cutoff folder names
 
I found and tried to install a libmcrypt tgz when phpMyAdmin gave me "Cannot load mcrypt extension."

It didn't fix the problem.

Now when I boot, I get a message about libmcrypt "is not an ELF file - it has the wrong magic bytes at the start."

So I try to uninstall libmcrypt and I get this:

Code:

root@darkstar:/usr/src/source# removepkg libmcrypt-2.5.7p1.tgz

Removing package /var/log/packages/libmcrypt-2.5.7p1...
Removing files:
  --> Deleting /ESC
  --> Deleting /ONTENTS
  --> /are/aclocal/libmcrypt.m4 no longer exists. Skipping.
  --> /b/libmcrypt.a no longer exists. Skipping.
  --> /b/libmcrypt.la no longer exists. Skipping.
  --> /b/libmcrypt.so.8.7 no longer exists. Skipping.
  --> /clude/mcrypt.h no longer exists. Skipping.
  --> /n/libmcrypt-config no longer exists. Skipping.
  --> /n/man3/mcrypt.3 no longer exists. Skipping.

It looks like somehow the folder names are getting the first two letters cut off. When I do installpkg -warn it shows +DESC, +CONTENTS, share, lib, include where that shows /ESC, /ONTENTS, /are, /b, /clude

I don't want to worry about the phpMyAdmin issue at this point. I just want my system clean and booting without errors.

Where do I begin with this?

BCarey 01-10-2009 12:21 PM

Where did you get that package? It seems like an OpenBSD package. These will not work on slackware. Did you not get error messages when trying to install it? You'll probably have to manually look through the package to see what it did and remove files. You'll also have to check the install script in the package to see what else it may have done.

If you can get your system cleaned up, get libmcrypt from slackbuilds.org.

Brian

bgeddy 01-10-2009 12:29 PM

Where di yoy get the package from ? The only libmcrypt-2.5.7p1.tgz i can find is a package for BSD. Besides the package name isn't in the Slackware standard format of name-version-arch-build.tgz . This leads me to believe that you may have installed a non Slackware package that is sending pkgtools a bit nuts. You should look at the contents of the .tgz and manually delete the files from your system. If all else fails this may work for you :

Code:

cd /directory_of_package
for fle in $(tar -tf  libmcrypt-2.5.7p1.tgz); do rm -i /$fle;done

You'll have to run it as root. Watch carefully as you have to confirm deletion and be careful what it is deleting !

edit: Sorry for repeating what Brian has said - he posted as I was typing this is -- too slow on the keys again !

Didier Spaier 01-10-2009 12:30 PM

I don't know where you got libmcrypt-2.5.7p1.tgz. When Googling for it I only found packages for OpenBSD with that exact name.

As a rule of thumb, if you want to keep a clean system, my two cents:
- only install pre-compiled packages coming from the official Slackware distribution or from a *really trusted* source -- I'm thinking of AlienBob's and Robby Workman's repositories.
- if you need an app not included in Slackware, first try to find a SlackBuild for it at slackbuilds.org and make yourself a package with it. Instructions are on their website.

Now for your problem :
1) Put libmcrypt-2.5.7p1.tgz in a clean place, then open it with explodepkg:
Code:

mkdir /home/user/tmppackages
mv libmcrypt-2.5.7p1.tgz /home/user/tmppackages
cd /home/user/tmppackages
explodepkg libmcrypt-2.5.7p1.tgz #run as root

2) Look at the hierarchy of files in it and rm what has to be. Be careful not to erase files not installed by the package, though.

3) If you still want to install libmcrypt, use the SlackBuild provided at slackbuilds.org. I did that with both Slackware 12.1 and Slackware 12.2 ant got phpMyAdmin working like a charm.

gnashley 01-10-2009 01:54 PM

That problem with the cutoff folder names coomes about when a package is created with a tar version other than tar-1.13 which is then installed with installpkg which uses tar-1.13.
I am not disputing that the package in question may be from BSD -which is still even more of a problem. I'm just pointing out that you would see the same thing if you installed a package which someone had created without using tar-1.13 -some people think they will be real smart and upgrade tar versions or remove tar-1.13 from their system. The pkgtools will still work, but only in this limited way. the really curious thing is that tar-1.13 will correctly unpack the archive -it just lists them wrongly in the package database. So the user must figure out what are the correct path names, edit the database file manually and then run removepkg in order to have the package removed. It's only the first two characters of the path which are truncated usually.
/are/ this would be /share
/clude/ this would be /include
/n/ this would be /bin


Notice there is no prefix for these paths, so the OP can safely remove the dirs /include and /share, but not /bin!!!
I haven't a clue what the /b/ might stand for..
I haven't searched for the package in question, but it obviously is not a Slackware package since it has no ARCH in the package name.

hellbillyJoker 01-11-2009 09:23 PM

Thanks for all the tips! You learn something new every day, huh? This is my first go with Linux, so I'm still learning a lot. I thought any .tgz was compatible with Slackware. Now I'll see if I can figure out how to get this cleaned up from the info you guys provided.

EDIT: I removed the files listed and everything seems good. Thanks again!


All times are GMT -5. The time now is 01:53 AM.