Update manager and synaptic package manager no longer working

Asked by Steven D. Shown

steven@Stevens-laptop:~$ sudo fuser -vvv /var/lib/dpkg/lock
sudo: unable to resolve host Stevens-laptop
[sudo] password for steven:
steven@Stevens-laptop:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.04
DISTRIB_CODENAME=natty
DISTRIB_DESCRIPTION="Ubuntu 11.04"
steven@Stevens-laptop:~$ uname -a
Linux Stevens-laptop 2.6.38-14-generic #58-Ubuntu SMP Tue Mar 27 18:48:46 UTC 2012 i686 i686 i386 GNU/Linux
steven@Stevens-laptop:~$ sudo rm /var/lib/apt/lists/lock
sudo: unable to resolve host Stevens-laptop
rm: cannot remove `/var/lib/apt/lists/lock': No such file or directory
steven@Stevens-laptop:~$ sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
sudo: unable to resolve host Stevens-laptop
steven@Stevens-laptop:~$ sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
sudo: unable to resolve host Stevens-laptop
steven@Stevens-laptop:~$ sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
sudo: unable to resolve host Stevens-laptop
steven@Stevens-laptop:~$ sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad
sudo: unable to resolve host Stevens-laptop
steven@Stevens-laptop:~$ sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sudo: unable to resolve host Stevens-laptop
steven@Stevens-laptop:~$ sudo rm -rf /var/lib/dpkg/updates/*
sudo: unable to resolve host Stevens-laptop
steven@Stevens-laptop:~$ sudo rm -rf /var/lib/apt/lists
sudo: unable to resolve host Stevens-laptop
steven@Stevens-laptop:~$ sudo rm /var/cache/apt/*.bin
sudo: unable to resolve host Stevens-laptop
steven@Stevens-laptop:~$ sudo mkdir /var/lib/apt/lists
sudo: unable to resolve host Stevens-laptop
steven@Stevens-laptop:~$ sudo mkdir /var/lib/apt/lists/partial
sudo: unable to resolve host Stevens-laptop
steven@Stevens-laptop:~$ LANG=C;sudo apt-get clean
sudo: unable to resolve host Stevens-laptop
steven@Stevens-laptop:~$ LANG=C;sudo apt-get autoclean
sudo: unable to resolve host Stevens-laptop
Reading package lists... Error!
E: Type 't/screenlets/ppa/ubuntu' is not known on line 1 in source list /etc/apt/sources.list.d/screenlets-ppa-natty.list
E: The list of sources could not be read.
E: The package lists or status file could not be parsed or opened.
steven@Stevens-laptop:~$ LANG=C;sudo apt-get --purge autoremove
sudo: unable to resolve host Stevens-laptop
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  libgdata1.7-cil* libgkeyfile1.0-cil* libgtk-sharp-beans-cil*
  libgudev1.0-cil* libmono-zeroconf1.0-cil* libtaglib2.0-cil*
  libubuntuone1.0-cil*
0 upgraded, 0 newly installed, 7 to remove and 0 not upgraded.
6 not fully installed or removed.
After this operation, 2130 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 183098 files and directories currently installed.)
Removing libgdata1.7-cil ...
Removing libgdata1.7-cil from Mono
Removing libgkeyfile1.0-cil ...
Removing libgkeyfile1.0-cil from Mono
Removing libgtk-sharp-beans-cil ...
Removing libgudev1.0-cil ...
Removing libgudev1.0-cil from Mono
Removing libmono-zeroconf1.0-cil ...
Removing libmono-zeroconf1.0-cil from Mono
Removing libtaglib2.0-cil ...
Removing libtaglib2.0-cil from Mono
Removing libubuntuone1.0-cil ...
Removing libubuntuone1.0-cil from Mono
Setting up google-chrome-stable (18.0.1025.162-r131933) ...
Setting up libwbclient0 (2:3.5.8~dfsg-1ubuntu2.4) ...
Setting up libsmbclient (2:3.5.8~dfsg-1ubuntu2.4) ...
Setting up samba-common (2:3.5.8~dfsg-1ubuntu2.4) ...
Setting up samba-common-bin (2:3.5.8~dfsg-1ubuntu2.4) ...
Setting up smbclient (2:3.5.8~dfsg-1ubuntu2.4) ...
Processing triggers for menu ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
steven@Stevens-laptop:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824sudo: unable to resolve host Stevens-laptop
E: Type 't/screenlets/ppa/ubuntu' is not known on line 1 in source list /etc/apt/sources.list.d/screenlets-ppa-natty.list
E: The list of sources could not be read.
steven@Stevens-laptop:~$ sudo dpkg --configure -a
sudo: unable to resolve host Stevens-laptop
steven@Stevens-laptop:~$ sudo dpkg --clear-avail
sudo: unable to resolve host Stevens-laptop
steven@Stevens-laptop:~$ LANG=C;sudo apt-get -f install
sudo: unable to resolve host Stevens-laptop
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
steven@Stevens-laptop:~$ LANG=C;sudo apt-get --fix-missing install
sudo: unable to resolve host Stevens-laptop
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
steven@Stevens-laptop:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824 && sudo apt-get dist-upgrade
sudo: unable to resolve host Stevens-laptop
E: Type 't/screenlets/ppa/ubuntu' is not known on line 1 in source list /etc/apt/sources.list.d/screenlets-ppa-natty.list
E: The list of sources could not be read.
steven@Stevens-laptop:~$

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
Mark Rijckenberg
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Have you been messing with /etc/hostname to change the system's netbios name by any chance?

Revision history for this message
Best Mark Rijckenberg (markrijckenberg) said :
#2

First run this command:

sudo rm /etc/apt/sources.list.d/screenlets*

Also run this command to remove all references to maverick in /etc/apt/sources.list.d/:

sudo rm /etc/apt/sources.list.d/*maverick*

You should never mix repositories from different versions of Ubuntu (maverick and natty), as it can and will break your package manager.

You are using natty ("Ubuntu 11.04"), so only references to natty should be mentioned in your apt-get sources list.

Revision history for this message
Steven D. Shown (stevenshown90) said :
#3

Thank you Mark Rijckenberg, that solved my problem, however I was unaware of the necessity to remove all references to maverick myself, as I thought that would be done automatically when doing the upgrade. And yes, actionparsnip, I did indeed change the systems name. Will this cause any problems with the system? and if so, how can I resolve it?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

Ok then you need to edit /etc/hosts so that the system can resolve it's own name to 127.0.0.1

Revision history for this message
Steven D. Shown (stevenshown90) said :
#5

I opened /etc/hosts to edit it so that the system can resolve it's own name to 127.0.0.1, but I am a little confused and unsure how to accomplish this. Can you please explain how to do this without causing any damage to my system? Thank you in advance for your time.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

Just change the occurrences of the old name, to the new name. Save the file and reboot.

Revision history for this message
Steven D. Shown (stevenshown90) said :
#7

Thanks Mark Rijckenberg, that solved my question.