LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   How to fix "corrupted?" apt-get (https://www.linuxquestions.org/questions/ubuntu-63/how-to-fix-corrupted-apt-get-4175603435/)

pizzipie 04-08-2017 01:41 AM

How to fix "corrupted?" apt-get
 
Is there a way to fix or re-install apt-get on my Ubuntu 14.04 OS.

Update: hangs up waiting forever for headers with lots of ign and err and hit. no gets.

Upgrade: hangs up waiting forever for headers. Says packages are "Not Authenticated".

Packages show up in Synaptic as not installed when they actually work (libreOffice Base for instance).

Thanks for help with fixing this.

R

ondoho 04-08-2017 01:46 AM

it seems my prediction from your previous thread came true faster than even i would have thought.

ON LINUX YOU DON'T JUST INSTALL STUFF NILLY-WILLY FROM THE WILD WEB!!!!!

and if you'd heeded any of the suggestions i've given you repeatedly, you'd know that by now.
:banghead:

pizzipie 04-08-2017 12:26 PM

1 Attachment(s)
Sorry to make you mad ondoho but I didn't intend to:

Quote:

...JUST INSTALL STUFF NILLY-WILLY FROM THE WILD WEB!!!!!
I got into this mess when I used the 'update software' app that appears periodically at the bottom of the screen. The other computer now works like it should, including the apt-get app.

This computer I am writing to you from works as far as the internet access goes. But I can't use apt_get.

Quote:

and if you'd heeded any of the suggestions i've given you repeatedly, you'd know that by now.
I have backed up all my data on this computer in preparation of installing Ubuntu 16.04 LTS. By the way,
the 16.04 'live' program on my flashdrive does now accsss the internet properly.

Here is a screenshot of what is happening with apt-get.

Thanks (hopefully) for your help on this).

R

frankbell 04-08-2017 07:50 PM

It's a bit of a long shot, but you could try, as root,

Code:

apt-get -f    <----for "fix broken packages"
See man apt-get for more.

What are the contents of your /etc/apt/sources.list file? Do you have any non-standard repos listed in it.

Be sure to surround any terminal output with "code" tags, which become available when you click the "Go Advanced" button below the compose post window.

pizzipie 04-09-2017 12:36 AM

Thanks for reply.

Doesn't work.

R

Timothy Miller 04-09-2017 01:00 AM

"Doesn't work." isn't really very helpful. Please give exact error that is given when trying it if you want to get any useful help.

ondoho 04-09-2017 03:01 AM

ok, i misread your first post and consequently overreacted.
but the gist is the same:
only half an hour before this thread started, i gave you advice, incl. 5 links that would take a considerable amount of time to read & apply to your present knowledge and state of things.

looking at your apt-get output, there's only 2 lines that give errors, and both contain "google" and "testing". Testing? smells fishy.
anyhow, remove the freaking google sources and do what was suggested a few posts up, and hope to god that google hasn't f*cked up your system.

pizzipie 04-09-2017 11:56 AM

Sorry ondoho,

I did not see your last post #41 so did not read the information. I will do that now.

R

pizzipie 04-09-2017 04:10 PM

[SOLVED]

I went to Troubleshooting in Repositories and as suggested took out all entries in Software & Updates/Other Software except for the Canonical Partners entries.

apt-get then worked.

I also received a script called 'fixpackage' from Ubuntu One under 'apt-get' as follows:

(Hope this can help somebody else who gets in this sort of trouble.)

Code:

#!/bin/bash
sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sudo rm -rf /var/lib/dpkg/updates/*
sudo rm -rf /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists/partial
sudo apt-get clean
sudo apt-get update
sudo dpkg --clear-avail
sudo dpkg --configure -a
sudo apt-get install -f
sudo apt-get update
sudo apt-get dist-upgrade

I ran this and everything seems back to normal.

It actually updated Firefox to v 52 without trouble.

Thank you all very much for your help in resolving this for me.

R

ondoho 04-09-2017 10:33 PM

glad to hear it.
google chrome, when downloaded & installed from the wild web, always adds their own sources, i consider that irresponsible: "Most important thing: You have google now. System breaks? Meh."

ardvark71 04-10-2017 06:31 AM

Quote:

Originally Posted by pizzipie (Post 5694875)
apt-get then worked.

Hi...

Glad you got it working. If you would, please mark this thread as "SOLVED" by clicking on "Thread Tools" directly above your initial post. Thanks! :)

Regards...


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