Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 411  / 2 Years ago, fri, september 2, 2022, 7:16:04

My Ubuntu is not booting anymore, after I wrote this command on terminal:



sudo apt-get autoremove eclipse


Then logged off.



Now it keeps trying to boot, but fail in some background-proccess on the booting screen (I can see the ones that fails if I press some key in the booting screen).



When I go to Ubuntu Advanced Options->Ubuntu (recovery mode) and try to do something, like repair packages, it says:



"libapt-pkgso.4.12: cannot open shared file"[...]


Or something like that.



I'll try to be more clear:



The apt-get is missing on my console, I can't get things by apt-get!



What can I do?
How can I install this package without booting Ubuntu?
Is there any kind of 'recovery point' in Ubuntu that I can use?



I can't lost my files inside Ubuntu's partition!


More From » boot

 Answers
1

OPTION 1



If you haven't tried this, give it a shot:



$ sudo apt-get install --reinstall libapt-pkg4.12


OPTION 2



Otherwise, you may have to do it manually. See if Comment # 4 in Upgrade problem, apt-get update leads to error message: libapt-pkg.so.4.12: file helps you. (Note that this is for Ubuntu 12.04, so you may have to make adjustments for your version of Ubuntu).



You may need another computer to download the required files to put them onto a USB stick, so you can repair your system. You can get the libapt-pkg4.12 files for Ubuntu 13.04 by clicking the amd64 or i386 links here: libapt-pkg4.12



Extract (using dpkg -x) and copy the files from the deb package to your computer using super user privileges.



OPTION 3



Instead of extracting the deb file, just manually reinstall the libapt-pkg4 package.




  1. On another computer, go to libapt-pkg4.12 and download the libapt-pkg4.12 package for Ubuntu 13.04 by clicking the amd64 or i386 (depending on your architecture).

  2. Copy these *.deb file onto a USB stick.


  3. On the computer you want to repair, open a terminal window, and type su - to elevate your privileges to super user level (since you mentioned sudo doesn't work, but su does).4. Insert the USB stick into your computer that you need to repair and open a terminal window.


  4. Type cd /media

  5. If you see your USB folder or files in /media, just skip to step 6. If you don't see anything in /media, then type dmesg and press enter. Look towards the bottom, and you will see a bunch of lines specifing the USB device you just plugged in. Near the botom of the output, you will see a line similar to "[27161.701717] sdb: sdb1". Note the "sdb1" part (it may be different on your computer). Now, manually mount the USB stick using these steps (replace sdb1 with your your own value obtained from the dmesg command).



    mkdir /media/temp



    mount -t vfat /dev/sdb1 /media/temp -o uid=1000,gid=1000,utf8,dmask=027,fmask=137



    cd /media/temp/


  6. Type ls -l to see your *.deb file. (If you don't see your *.deb file, you may have to cd into sub-directories on your USB stick).


  7. If you have downloaded the x32 bit package, type the following to install it:



    dpkg -i libapt-pkg4.12_0.9.7.7ubuntu4_i386.deb


  8. Or, if you have downloaded the x64 bit package, type the following to install it:



    dpkg -i libapt-pkg4.12_0.9.7.7ubuntu4_amd64.deb



[#30034] Saturday, September 3, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
hergy

Total Points: 64
Total Questions: 115
Total Answers: 109

Location: Saint Helena
Member since Tue, Nov 3, 2020
4 Years ago
;