2

I'm trying to update my Ubuntu system, but cannot do anything with the Update Manager. I get the following error message:

Could not initialize the package information
An unresolvable problem occurred while initializing the package information.
Please report this bug against the 'update-manager' package and include the following error message:
You may want to run apt-get update to correct these problems, 
E:The package perl-base needs to be reinstalled, but I can't find an archive for it.'
Fabby
  • 34,259

2 Answers2

0

Open a terminal and run the following:

sudo apt-get update

This should update the package lists, and the problem may have been caused a process being terminated while in the middle of updating. Make sure not to interrupt it this time.

sudo apt-get dist-upgrade

This will upgrade all packages, and hopefully there will be no errors. If this works, then chances are that when you open up Update Manager again, there won't be any errors.

To remove a broken repository, run the following in the terminal:

cd /etc/apt/sources.list.d
ls

Extra repositories will be listed. To delete the one you don't want any more:

sudo rm <file>

For example:

sudo rm opera.list

Then, run the first two commands again (sudo apt-get update and sudo apt-get dist-upgrade). This time, there should be no errors.

  • W: Failed to fetch http://deb.opera.com/opera-beta/dists/stable/non-free/i18n/Translation-en Unable to connect to deb.opera.com:http:

    E: Some index files failed to download. They have been ignored, or old ones used instead.

    – AFEED SM May 27 '15 at 21:41
  • That's an old Opera repo that doesn't exist any more. The others should still work, however. – David Bailey May 28 '15 at 06:42
  • then how can i fix my problem ?????????? – AFEED SM May 28 '15 at 09:16
  • I will update my answer, hang on... – David Bailey May 28 '15 at 09:17
  • updated it. BTW do you still use Opera? – David Bailey May 28 '15 at 09:19
  • root@afeed-Vostro-1540:/etc/apt/sources.list.d# ls ferramroberto-minitube-precise.list google-talkplugin.list.save ferramroberto-minitube-precise.list.save upubuntu-com-xampp-precise.list google-chrome.list upubuntu-com-xampp-precise.list.save google-chrome.list.save videolan-stable-daily-precise.list google-talkplugin.list – AFEED SM May 28 '15 at 10:06
  • what's the output of cat /etc/apt/sources.list? – David Bailey May 28 '15 at 10:07
  • root@afeed-Vostro-1540:/etc/apt/sources.list.d# sudo apt-get update Hit http://dl.google.com stable Release.gpg Hit http://dl.google.com stable Release.gpg
    Hit http://dl.google.com stable Release
    Hit http://ppa.launchpad.net precise Release.gpg
    Hit http://ppa.launchpad.net precise Release.gpg
    – AFEED SM May 28 '15 at 10:11
  • thanks, what's the output of cat /etc/apt/sources.list /etc/apt/sources.list.d/* | grep opera? – David Bailey May 28 '15 at 10:12
  • root@afeed-Vostro-1540:/etc/apt/sources.list.d# cat /etc/apt/sources.list cat: /etc/apt/sources.list: No such file or directory – AFEED SM May 28 '15 at 10:15
  • root@afeed-Vostro-1540:/etc/apt/sources.list.d# cat /etc/apt/sources.list /etc/apt/sources.list.d/* | grep opera cat: /etc/apt/sources.list: No such file or directory – AFEED SM May 28 '15 at 10:17
  • hang on a minute... – David Bailey May 28 '15 at 10:17
  • run sudo wget 'http://repogen.simplylinux.ch/txt/sources_4e6610edce42a24a2a6a6fb20062756338120ffd.txt' -O /etc/apt/sources.list and run the cat command again – David Bailey May 28 '15 at 10:20
  • sorry, ignore the last comment. Run sudo wget 'https://gist.githubusercontent.com/tech4david/1d5bb9ff98e8cf05558a/raw/9c77c8c9da19e35a784ef2cd468b823f2338cd04/sources.list' -O /etc/apt/sources.list and then run the cat command again. – David Bailey May 28 '15 at 10:24
  • root@afeed-Vostro-1540:/etc/apt/sources.list.d# sudo wget 'https://gist.githubusercontent.com/tech4david/1d5bb9ff98e8cf05558a/raw/9c77c8c9‌​da19e35a784ef2cd468b823f2338cd04/sources.list' -O /etc/apt/sources.list --2015-05-28 13:36:36-- https://gist.githubusercontent.com/tech4david/1d5bb9ff98e8cf05558a – AFEED SM May 28 '15 at 10:38
  • Connecting to gist.githubusercontent.com (gist.githubusercontent.com)|185.31.17.133|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2015-05-28 13:36:37 ERROR 404: Not Found.

    --2015-05-28 13:36:37-- https://gist.githubusercontent.com/tech4david/1d5bb9ff98e8cf05558a/raw/9c77c8c9%E2%80%8C%E2%80%8Bda19e35a784ef2cd468b823f2338cd04/sources.list Connecting to gist.githubusercontent.com (gist.githubusercontent.com)|185.31.17.133|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2015-05-28 13:36:37 ERROR 404: Not Found.

    – AFEED SM May 28 '15 at 10:39
  • see this -> http://askubuntu.com/questions/124017/how-do-i-restore-the-default-repositories – David Bailey May 28 '15 at 10:41
0

TL;DR Open a terminal and run these commands:

sudo apt-get update
sudo apt-get install --reinstall perl-base
sudo apt-get upgrade

Explanation

  • apt-get update

    • update

      update is used to resynchronize the package index files from their sources.

  • apt-get install --reinstall

    • install

      install is followed by one or more packages desired for installation or upgrading.

    • --reinstall

      Re-install packages that are already installed and at the newest version.

  • apt-get upgrade

    • upgrade

      upgrade is used to install the newest versions of all packages currently installed on the system from the sources enumerated in /etc/apt/sources.list.

A.B.
  • 90,397
  • afeed@afeed-Vostro-1540:~$ sudo apt-get install --reinstall perl-base Reading package lists... Done Building dependency tree
    Reading state information... Done W: Duplicate sources.list entry http://archive.canonical.com/ubuntu/ precise/partner i386 Packages (/var/lib/apt/lists/archive.canonical.com_ubuntu_dists_precise_partner_binary-i386_Packages) W: You may want to run apt-get update to correct these problems E: The package perl-base needs to be reinstalled, but I can't find an archive for it.
    – AFEED SM May 27 '15 at 21:26
  • Please add information by editing your original post, not in comments. – Pilot6 May 27 '15 at 22:13