LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   I just destroyed my computer by installing a bad package. (http://www.linuxquestions.org/questions/slackware-14/i-just-destroyed-my-computer-by-installing-a-bad-package-665443/)

Anithen 08-26-2008 02:42 AM

I just destroyed my computer by installing a bad package.
 
This is what I did:

I downloaded an older version of glibc_2.7 from a site. Sorry, I don't know exactly where from. It was near the top of the google results and from rpmfind, though. The computer was totally unusable after I ran rpm2targz, then src2pkg on the package.

As root, I ran installpkg package.tgz. I saw a bunch of messages, such as /usr/bin/rm - no such file or directory. Then every command I ran was no such file or directory. I tried logging in on a tty (outside of X). After typing my username I didn't get a change to type my password. I feel so defeated. Anyway, there's a small change this wasn't just a malicious package, because I don't think the commands or directories were deleted. I was able to still cd to /usr/bin, for instance, and still able to auto complete all the commands I and INIT are unable to execute. Maybe converting the rpm to tgz on glib somehow was bad when running installpkg, or maybe installpkg was altered by another package I installed with installpkg earlier. I've been trying for days to install something to do video editing with. I tried everything, and the more I tried, the more weird and obscure dependencies I had to download and install. I was trying to install the older version of glib for cinerella available at linuxpackages. Glib 2.7 was the last dependency it complained about, needed for libc.so.6.

Going from room to room, I see on the destroyed computer when I try to reboot it:

INIT: unable to execute /sbin/agetty
INIT: Id "c3" spawning too fast. disabling for 5 minutes.

Should I just go ahead and reinstall, or is this fixable through a live distro? I feel so defeated.

Thanks for any help provided,
Anithen

AceofSpades19 08-26-2008 03:01 AM

glibc is one of the few things you _don't_ change, and even if you do, you install an official slackware glibc package, not some rpm glibc from rpmfind which you don't even know that is compatible with slackware and you never install packages from linuxpackages.net. You could try reinstalling the glibc package from the slackware disc by mounting your root partition with your slackware disc.

Anithen 08-26-2008 03:26 AM

Thanks, I think I will try that. I had the crazy notion of being able to have my slackware version of glibc and an older verson on their just for cinerella. Anyway, I will definitely try reinstalling glibc from disc. Also, I will try using a live distro to mount the disc and see if all these files are, for some reason, non-executable, since all the files are there and I'm seeing the commands can't be executed, not no such file or directory.

I'll report back w/ more info, but for now I'm going to bed, the day wasted, but a good lesson learned. In a way this is humbling.

pinniped 08-26-2008 04:20 AM

The best thing to do is:

1. Boot from a Live CD
2. mount your root partition (but not in root)
3. inspect the contents of that tarball so you can see where things were installed - and manually remove items (including symlinks)
4. inspect the package for the good libc6 that you had - and manually unpack and install things
(check for symlinks which may have been intended to be created by a post-install script).

You can't actually boot a rescue CD and switch your root partition since you'll have the same problem as soon as the rescue CD mounts your root partition - a bad libc. You have to do all the fixing while booted into a different system.

Anithen 08-26-2008 03:35 PM

pinniped: Thanks a lot for the suggestion. I never knew glibc would effect so much, but am glad to know it wasn't just a shady package changing permissions on commands or deleting content. I'm excited to try what you suggested. I wish I could just leave work now to get started on the repair process.

theYinYeti 08-26-2008 03:44 PM

It is hard but it can be done. I did the same mistake. I repaired it just as was suggested to you, using a live CD.

Yves.

MannyNix 08-26-2008 03:56 PM

You may also want to take a look at Robby's glibc-recovery. Good luck!

keefaz 08-26-2008 03:58 PM

I also did a wrong glibc update, I fixed it with the slackware install cd
That happens :) Better soon than later

Anithen 08-27-2008 12:34 AM

I appreciate all the replies. That glibc-recovery link really helped me end the experimental mindset and just get to work. I followed the directions exactly and everything's back to normal. The only thing I didn't need to do was rm /mnt/lib/incoming or /mnt/lib/tls (they didn't exist on my computer).

Unfortunately, though, I'm back to square one with trying to get something on my computer to edit video. I read @ work that texmex suggests Lives. I'll try compiling and installing that in a minute, but if there's a thousand dependency issues I'm going to give it a rest until tomorrow.

I know it's not their responsibility, but I wish the people who create and package this great multimedia software would either include all of the dependencies (and the dependencies' dependencies) or at least have a wget script included to get all the packages needed. They have to know people out there are struggling, staying up all night trying to edit videos or whatever the project may be, but aren't even able to compile or run precompiled builds.

Nylex 08-27-2008 12:46 AM

Quote:

Originally Posted by Anithen (Post 3260997)
I know it's not their responsibility, but I wish the people who create and package this great multimedia software would either include all of the dependencies (and the dependencies' dependencies) or at least have a wget script included to get all the packages needed. They have to know people out there are struggling, staying up all night trying to edit videos or whatever the project may be, but aren't even able to compile or run precompiled builds.

Package managers usually resolve dependencies, so you may want to consider using slapt-get (or other Slackware tools. I don't know since I don't use them), or another distro with a "better" package management system.

vharishankar 08-27-2008 02:01 AM

For what it's worth from the Lives site, it has a huge list of dependencies:

http://lives.sourceforge.net/index.php?do=downloads
Quote:

* mplayer 0.90rc1+ compiled with jpeg/png support (version 1.0pre8+ recommended)
* ImageMagick 5+
* perl 5+
* gtk+ 2.10+
* libjpeg62
* gdk-pixbuf-loaders
* sox
* python 2.3.4+ (recommended)
* SDL (recommended)
* mencoder 1.0-pre5+ (recommended)
* libmjpeg-tools (recommended)
* libtheora (recommended)
* libjack/jackit (recommended)
* xmms (optional)
* cdda2wav (optional)
As for recommended packages, I think they're needed to get the full functionality of the application.

Ilgar 08-27-2008 02:07 AM

Quote:

Originally Posted by harishankar (Post 3261062)
For what it's worth from the Lives site, it has a huge list of dependencies:

http://lives.sourceforge.net/index.php?do=downloads

Almost all the stuff I see there comes with Slackware, don't they?

ledow 08-27-2008 02:25 AM

Dunno about the rest but I'm pretty sure that mencoder, mplayer, libmjpeg, libjack, and gdk-pixbuf-loaders(?) don't (based on a quick slocate on an installed Slackware machine). If it does, you REALLY want to check the versions properly, as well as any needed compilation options and patches.

Plus, you're probably talking about development headers, source etc. being available, not just the actual library itself (e.g. libtheora).

Ilgar 08-27-2008 02:57 AM

Quote:

Originally Posted by ledow (Post 3261078)
Dunno about the rest but I'm pretty sure that mencoder, mplayer, libmjpeg, libjack, and gdk-pixbuf-loaders(?) don't (based on a quick slocate on an installed Slackware machine). If it does, you REALLY want to check the versions properly, as well as any needed compilation options and patches.

Plus, you're probably talking about development headers, source etc. being available, not just the actual library itself (e.g. libtheora).

The headers won't be a problem in Slackware, as all official packages include the headers (so we don't have -devel packages in Slackware). From that list, Imagemagick, gtk, perl, libjpeg, sox, python, libtheora, SDL should be there already (and probably cdda2wav, too). You can grab one of the old official XMMS packages and install it on 12.1. mplayer and mencoder are the same thing, i.e. mencoder is part of mplayer and they easily compile on Slackware (if you still don't want to bother, there are packages or buildscripts out there). That leaves us with libmjpeg-tools, libjack and gdk-pixbuf-loaders(?). I think there are packages/scripts for libjack, too, and the others shouldn't be a problem.

One of the things I like about Slackware is that since all the packages include headers and come with unpatched, vanilla versions of the software, compilation of new software is almost always a painless issue.

tommcd 08-27-2008 08:01 AM

You can get an excellent MPlayer, which comes with mencoder, build script from slackbuilds.org
http://slackbuilds.org/repository/12...media/MPlayer/


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