Page 1 of 1

I broke aptitude and apt-get. How to reinstall or fix them?

Posted: Sat Aug 24, 2013 1:24 pm
by niisiis
Yesterday, I accidentally removed all of my repositories from enabled list in package manager. Actually I wanted to use the filter function. After that the package manager didn't start any more. I tried to fix the problem using my own mind, but I'm afraid I only made it worse. When I try to use aptitude it gives me "Segmentation fault" error and apt-get doesn't respond as usual as well. Can somebody help me? What should I do?

I have linux mint 15 64-bit using Cinnamon.

Re: I broke aptitude and apt-get. How to reinstall or fix th

Posted: Sat Aug 24, 2013 2:21 pm
by xenopeek
niisiis wrote:I accidentally removed all of my repositories from enabled list in package manager
If I understood you correctly; you used Synaptic Package Manager and from its menu selected Settings > Repositories and there cleared the tick box for each enabled repository? I did that also, and indeed it gives some strange behavior. I restored normal function by opening Software Sources from the menu (just type in your menu to find it) and clicking the "Restore the default settings" button at the bottom of the first screen. Should probably work for you also (though it won't restore any PPAs or other repositories you added I think, but it will at least restore all the default Linux Mint and Ubuntu repositories).

Re: I broke aptitude and apt-get. How to reinstall or fix th

Posted: Sat Aug 24, 2013 3:08 pm
by niisiis
That would have been really useful yesterday, but I'm afraid I have broken my configuration with many commands I read from google-ing different topics. Currently aptitude gives segmentation fault error. Synaptic package manager's and software manager's GUIs don't open up no more.

Re: I broke aptitude and apt-get. How to reinstall or fix th

Posted: Thu Aug 29, 2013 10:05 pm
by leekohlbradley
Yup, seems this is easy to do because I've managed the same thing! No package-related command or program of any kind will run, apt, deb or whatever. I'm getting segmentation errors and if I try to open synaptics it shows a large number of

Code: Select all

(synaptic:2787): Gtk-WARNING **: GtkNotebook 0xe344a0 is mapped but visible child GtkLabel 0x11722b0 is not mapped
Hope there's a solution! Thanks

Re: I broke aptitude and apt-get. How to reinstall or fix th

Posted: Fri Aug 30, 2013 12:09 am
by z1p101
Yea, it's really easy to do, one click and it's all over. The file official-package-repositories.list found in /etc/apt/sources.list.d gets corrupted or encrypted or something? What I did to fix it was copied the file off my live cd and used it to replace the bad one on my system.

Here is the content of official-package-repositories.list for Mint 15 if you want to remove the bad one and replace it.

Code: Select all

# Do not edit this file manually, use Software Sources instead.

deb http://packages.linuxmint.com olivia main upstream import  #id:linuxmint_main

deb http://archive.ubuntu.com/ubuntu raring main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu raring-updates main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu/ raring-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ raring partner
Just replace the file and apt should run again. My other repos were still intact but I don't know your situation.

Good luck.