LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 04-13-2014, 12:33 PM   #1
kjell159
Member
 
Registered: Aug 2013
Distribution: Fedora 20 jam, SME Server
Posts: 32

Rep: Reputation: 1
Question I did something dumb, I removed libc6 package and now my system won't boot in DE


Hello,
Previous week I got a fresh install on my laptop because the OS I was using before was 32 bit together with a 64 bit version of Debian Squeeze (version 6).

I kept an eye out for this Linux distro called 'Tango Studio' which was first based on Ubuntu but the newest release is based upon Debian 7.4 so I decided to give it a try.

I was quite happy with the realtime kernel it came with + the distro comes in both 32 bit and 64 bit (AMD). (I have 6 GB of RAM and 32 bit seems to only go up to 4 except when you use a PAE kerenel so it would be a waste to not get a 64 bit system.)

I had the usual problems with my WIFI but I managed to get a driver and it worked fine in the end.
When I booted in everything got setup just like in another OS like Windows and OS X. (On Ubuntu I never had driver issues but I just don't like Ubuntu that much, primarily because of the fact they have non-free software in their repos. So I take it that I have to configure a lot of this stuff myself.)

Now the actual problem: I was trying to get hamachi (a program to create VPN-networks over the internet) working on my system and I managed to get it installed but when I tried to start it but typing 'hamachi' in my terminal
(There is a GUI to work together with this program called 'haguichi' but I first wanted to make sure it was working in CLI as well.)
it gave me an error message saying GLIBC_2.14 was not found.

GLIBC is libc6 on my system and when I searched for it in my package manager I found out that I indeed had an older version.
I searched for a newer version on the web and downloaded a .deb package containing a newer version.
When I opened it with gdebi the option to install it was greyed out so I thought (Here comes my dumb idea. ) it maybe was because I had an older version already installed so I went back to my package manager and decided to remove the package, only to realize it was a dependency and actually the GNU C library (so essential for like my whole system) when it was already half done!

So... now I'm kinda screwed.
I included a picture (please don't mind the flash) showing you how my system looks right now.
I guess it is just BASH starting up.
I can still browse my folders and files so I hope I can still rescue some of them. (It isn't a lot because like I told, I only have this system for like a week.)

Is there still a way to solve this and get back logged in to a desktop environment? (I had Openbox, LXDE and MATE installed.)
At least I hope so because I am really not looking forward to getting everything back configured. (It took me some uhum... hours. :S)

Maybe as a reminder: I am on a Debian 7.4 64bit based system with a 3.2.0-4-realtime kernel.
And it may be cliché but please don't mind my grammar sometimes, I had a lot to explain so I wasn't looking forward to make sure everything is fine English. (I'm not English anyway.)
Posting this on the Windows system of my brother. (But I don't think that matters.)
Attached Thumbnails
Click image for larger version

Name:	DSC_0581.jpg
Views:	91
Size:	250.6 KB
ID:	15236  

Last edited by kjell159; 04-13-2014 at 12:38 PM.
 
Old 04-13-2014, 01:08 PM   #2
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 491Reputation: 491Reputation: 491Reputation: 491Reputation: 491
The usual thing to do if you uninstall libc, which I have done before twice , is boot into the install disk and re-install just libc. Everything should work normally after that.
 
Old 04-13-2014, 01:23 PM   #3
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: AntiX 17
Posts: 5,621
Blog Entries: 20

Rep: Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675
When I did the same mistake in AntiX.

I copied the one from the live iso back into my install.

Debian makes live isos I am pretty sure.

Quote:
I kept an eye out for this Linux distro called 'Tango Studio' which was first based on Ubuntu but the newest release is based upon Debian 7.4 so I decided to give it a try.
Never mind. I see you have one.

Last edited by rokytnji; 04-13-2014 at 01:26 PM.
 
Old 04-13-2014, 02:25 PM   #4
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,220

Rep: Reputation: Disabled
If you still can boot the system -- even in CLI -- you can log in as root and install libc6 with apt-get:

Code:
apt-get update
apt-get install libc6
Then reboot and see if it works:

Code:
reboot
 
Old 04-13-2014, 02:52 PM   #5
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 496Reputation: 496Reputation: 496Reputation: 496Reputation: 496
Quote:
Originally Posted by odiseo77 View Post
If you still can boot the system -- even in CLI -- you can log in as root and install libc6 with apt-get:

Code:
apt-get update
apt-get install libc6
Then reboot and see if it works:

Code:
reboot
Yes, this is the way to go. You have a user prompt ($) so there is actually nothing you can't do with your system. Just install the thing as you would in any terminal.

You do need to install as root and I have no idea if your Debian respin has you set up a root password or not. If not then you will need to use "sudo" with any apt-get command.
 
Old 04-13-2014, 03:05 PM   #6
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: AntiX 17
Posts: 5,621
Blog Entries: 20

Rep: Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675Reputation: 2675
@odiseo77 and widget

On mine. That was the 1st thing I tried was reinstalling it.
Apt errored out on that.
Too long ago to post the error.

Hence why I had to copy from Live cd.

I hope the OP has better luck though.
 
Old 04-13-2014, 03:13 PM   #7
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,220

Rep: Reputation: Disabled
Quote:
Originally Posted by rokytnji View Post
@odiseo77 and widget

On mine. That was the 1st thing I tried was reinstalling it.
Apt errored out on that.
Too long ago to post the error.

Hence why I had to copy from Live cd.

I hope the OP has better luck though.
It's likely, yes. After posting I wondered whether apt-get depends on libc6 (I'm not on Debian at the moment to check). If it does, then my solution probably won't work. In that case, I guess copying the library from a live CD to the right location as you suggested, would be the way to go.

Cheers!
 
Old 04-13-2014, 04:28 PM   #8
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 491Reputation: 491Reputation: 491Reputation: 491Reputation: 491
apt-get and other programs won't run without libc, so it's a catch22, you need to boot into an install or live disk.
 
Old 04-13-2014, 07:04 PM   #9
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 496Reputation: 496Reputation: 496Reputation: 496Reputation: 496
Well I sure am embarrassed.

Still I would install it properly. If installed by the package manager it will be more likely to work flawlessly and be recognized by the package manager. It may be if copied but it may not be.

dpkg is actually the package manager for Debian, apt-get and so forth are front ends that are easier to use.

dpkg will work to install the package.
Code:
dpkg -i libc6
I believe is the correct command. I rarely use dpkg for installation so am not positive.

This is the tool to use when things are really screwed to straighten out apt-get or aptitude. I am used to using apt-get mainly although aptitude has its great points. Debian recommends apt-get since the release of Squeeze.

Really best to just use one or the other (apt-get or aptitude). One thing that is nice in aptitude is the commands "why" and "why-not". This is to ask about installing a package.

In this case;
Code:
aptitude why libc6
would have given you a very good clue as to why it is there. Very handy if trying to slim down an install.

why-not would give you the reasons why a package is not installed or why you can't install it.

You are always better off to install through the CLI rather than a gui. For one thing the gui is just a tool for running the CLI commands. For another it would be a huge package if it did everything the way it can be done in terminal. Most important you do not get the same quality of feedback on possible problems in a gui.

One of the reasons a lot of people still prefer aptitude is that if there is a dependency problem with a package it will give you alternatives that you might use. Kind of time consuming but not as bad as having to rescue your system.

Apt-get doesn't have that feature because it was written after dependency problems using Debian packages pretty much were a thing that didn't happen.

Instead of getting packages from the web, get them from the Debian repos. It is NOT recommended to use Debian testing (Jessie) or Debian unstable (Sid) packages in Debian stable (Wheezy). However this is a better choice than using other packages from some other source.

You do that by simply adding the repos to your sources.list. This can really screw your system and you should study up on pinning and set up your /etc/apt directory to use pinning so that the packages from what ever other repo you are using are the only ones coming from that repo.

One thing you may want to consider is checking to see if Jessie is using the package you want. It is pretty stable. Ubuntu bases their LTS on Debian testing and their other releases on Sid. Debian has a different idea of what stable means than most distros. Non the less it is not stable. You will find that a huge bunch of Debian users on LQ prefer testing or Sid to Debian stable. And argue which is easier. They both are great. My desktop died (see sig for specs) and I am now on an antique laptop running Wheezy. Drives me nuts.

Xfce 4.10 is much nicer than 4.8. Not a lot different but there are improvements. Tabbed file browsing in Thunar is the big one for me.

Jessie may be what you need.

I still haven't looked up the respin you are using but if they are using the Debian repos rather than their own you should be able to upgrade to Jessie.

I would not do that to a working stable install like you already have assuming you can get the libc6 package back. I would dual boot with another copy of the one you are using. Upgrade it to the jessie repo. See what happens.

Configuration of the new install should be easy. Install everything you have on the current one and simply copy the user config files from you home directory (all those hidden files usually expressed as ~./foo files). This will give you the same configuration down to bookmarks, panel settings, wallpaper, terminal configuration.

One thing you could do, for that matter, is to use the live session to resize things so you have room for another install and simply use gparted to copy/paste your current install to another partitionl. Running;
Code:
update-grub
should then pick it right up on your current installs grub and put it on the menu.

When you know it is working you can simply install the package apt-listbugs (which I have on Wheezy too) and make sure wheezy is up to date and upgrade to Jessie.

This may get you the dependencies you need for hamachi.

I know nothing about this package. Never heard of it. It is not in the Debian repo. I would highly recommend checking to see if there is a posibly usable alternative in the Debian repo. There probably is.

It will be different. It will set up differently. If such a package exists, however, it would be easier to learn to use than to have to fix your entire install.

As one of the smart asses here on LQ has in his sig "if it isn't in the repo you don't need it or it doesn't exist." I agree with this completely and so far have found that everything I want or need is in the repo. May be different than what I am used to but it does the same thing.

Living by that is a good way to not have problems.

Another thing is that if you use only packages from the repo for your release you will likely be able to upgrade easily to the next release when it comes out. Packages from other repos will cause you problems just about everytime.

This is why Ubuntu has the package ppa-purge which will wipe out all packages installed from all ppa's and replace the packages with the ones native to the release. Main cause of version upgrade failure in Ubuntu.

You may be like me and prefer a clean install though where this is not a problem. There are times, however, that a version upgrade, particularly in a large finely tuned and configured install that you really don't want to reconfigure.

Of coarse if you install Sid it just keeps going until it breaks. With care it is pretty solid though. If you go to testing and change the repo to read "testing" instead of "jessie" (currently) it will simply upgrade to the next testing when Jessie is released. As there is little or no difference for quite a while this should not be a problem either.

Sorry for the lecture but you sound like an interesting person and I remember before I dropped Windows that 3rd party packages were the norm. If you currently or recently have used that system you should know that this is not a secure thing to do there at all but that you have to.

Under Linux the thing to do is find a distro or release of a distro that supports and supplies the packages you need if at all possible as this is the most stable way to use packages. You are assured that they are well integrated to the system.

Externally supplied packages are, as in Windows, also a security risk. Not nearly as much because someone would notice it in the code. As we know now, however, even open source code can have flaws not seen for a couple of years. Packages maintained by a solid distro like Debian or Red Hat or Slackware or Arch are probably the most safe packages in the computing world.

Use the native repos when ever it is at all possible. Even if you do have to learn something new.

On the other hand what you have going on right now is definitely educational and, as we used to say in ubuntu-testing, FUN.

Just some things to consider. This is Linux. It is your box. It is your OS. It is your choice. And you get to keep the pieces when it breaks.

Have no idea how many I have broken in the last six years. Learned from every one of them. And it was FUN.
 
Old 04-14-2014, 05:51 PM   #10
kjell159
Member
 
Registered: Aug 2013
Distribution: Fedora 20 jam, SME Server
Posts: 32

Original Poster
Rep: Reputation: 1
Yes, I definitely learned some stuff.
I was better of waiting another day before trying to fix this.
What I did was boot live into the cd but I couldn't find a way to get into my hard drive so I tried your method (by using apt-get) in the CLI that I still could boot in.
I installed the libc6 package from there but it said there were packages that could get removed by the 'apt-get autoremove' command, I did that but what happened is that my system got even worse.

So I just gave in and reinstalled my whole OS again from the cd and got everything configured again.
The files I lost weren't that of much value though so I can live with that.

I still really appreciate the big feedback, again, I learned some new stuff aswell.

That is the nice thing about Linux, you can build/configure/look into almost every aspect of it.
I still like to keep it as it is now though.

Now everything is back configured: WIFI, GUI, ...
And hamachi works!
I'll explain: I got a Sid repository and got libc6 version 2.18-4 from there.
I immediately removed it after that because I (like you said) don't want to mess with my repositories to much.
The first time I tried this method to get a newer version of libc I made my system completely unusable. (So no CLI either, it gave lines of error messages when booting up.)
I can't even remember how many times I (re)installed this OS.

But it works now. Finding the driver for my WIFI card wasn't that hard anymore, it is a Broadcom... because I did it in the previous install.

Last edited by kjell159; 04-14-2014 at 06:05 PM.
 
Old 04-14-2014, 06:15 PM   #11
darry1966
Member
 
Registered: Sep 2011
Location: Christchurch NZ
Distribution: Devuan
Posts: 117

Rep: Reputation: 35
We can learn from making mistakes keep notes of these things you learn it may be useful in the future.
 
Old 04-14-2014, 07:26 PM   #12
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,189

Rep: Reputation: 1037Reputation: 1037Reputation: 1037Reputation: 1037Reputation: 1037Reputation: 1037Reputation: 1037Reputation: 1037
For the record (and for others to learn). If you have to install through dpkg -i, you have to provide the full path to the package:
Code:
dpkg -i /var/cache/apt/archives/libmailtools-perl_2.09-1_all.deb
Replace the package name by the correct package. I don't currently have glibc in the cache so I can't put the correct name in the example.

jlinkel
 
Old 04-19-2014, 05:40 AM   #13
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Debian, Arch, FreeBSD & OpenBSD novice, Hackintosh
Posts: 1,177
Blog Entries: 7

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
Also, just a note about deb packages, if you ever bork the system to the point to where dpkg will not work: it's said that these packages were designed so that all that was needed were basic tools (ar, tar, gzip) to restore a package. If these won't work on an existing system (tar requires libc6 in this case), you can do it through a live session.

See http://www.debianhelp.co.uk/debianproblem.htm, at the very bottom of the page. Those instructions apply to any package.

Quote:
Originally Posted by widget
Still I would install it properly.
Which will be a problem in this case, but definitely the way it should be done. If one just copies from another medium, the version may not match what the existing system expects, and binaries will still be broken. Also, since libc was uninstalled, there's no record of it in the databases, which means in the future it will not get updates, etc.

Quote:
Originally Posted by kjell159 View Post
What I did was boot live into the cd but I couldn't find a way to get into my hard drive so I tried your method (by using apt-get) in the CLI that I still could boot in.
I installed the libc6 package from there but it said there were packages that could get removed by the 'apt-get autoremove' command, I did that but what happened is that my system got even worse.
Heh, yeah, it suggested them for autoremoval because their dependency, libc6, was removed.

I say this every time such problems are mentioned, time and time again, read, read, read what apt-get, aptititude, etc output before pressing y and hitting Enter. It warned you. Don't use -y and --yes. Hopefully, OP you learned your lesson. Put it on a sticky somewhere.

Now that you got your system back, once you have the packages you want installed and they way you want things, make a list of packages you have installed, store it somewhere safe, and now you'll know what you need to reinstall once you have a working system again.

Code:
$ dpkg -l | grep '^ii' | awk '{print $2}' > packages_i_have_installed_or_whatever_i_want_to_call_the_file

Last edited by goumba; 04-19-2014 at 05:47 AM.
 
Old 04-21-2014, 11:02 PM   #14
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,660

Rep: Reputation: 444Reputation: 444Reputation: 444Reputation: 444Reputation: 444
Quote:
Originally Posted by kjell159 View Post
I got a Sid repository and got libc6 version 2.18-4 from there.
I immediately removed it after that because I (like you said) don't want to mess with my repositories to much.
^^ That is going to cause you trouble ...

You have a whole boatload of wheezy software that is expecting 2.13 (whether it actually depends on it or not) and further installs could be problematic, as you have the "new" libc6 (and presumably a handfull of hard-depends on that from sid).

In short, your system is a mess, and even though it may work now, I wouldn't count on it remaining that way if you attempt to install anything else.
 
  


Reply

Tags
bash, boot failure, debian, glibc, libc6


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
centos 4.4 - 3 of 4 hard drives removed now won't boot- can't find lv so kernel panic smileamiledr Linux - Newbie 2 01-17-2010 09:42 AM
Installed SUSE now Vista won't boot - mountpoint removed when not properly shutdown Retrofill Linux - Newbie 22 10-18-2007 08:36 PM
Is base-config package removed from your system with aptitude dist-upgrade? Akhran Debian 6 03-18-2006 08:52 PM
Removed linux partitions, now won't boot to windows! EnigmaZ Linux - Software 18 04-10-2004 06:51 PM
Removed Second HD with Dual-Boot RH9/XP Box; Now Grub Won't Load MadFunk Linux - General 1 01-05-2004 07:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 03:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration