No such file or directory

Asked by David

dpkg:failed to open package info file /var/lib/dpkg/available for reading: No such file or directory

E: sub process/usr/bin/dpkg returned an error code (2)
A package failed to install.

When I try to update I get broken count >0
when I go to system, admin, synaptic package manager, broken remove I am unable to do so and get the above message.
David

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu update-manager Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Ariel Cabral (acabral1961) said :
#1

Open a Terminal and run:
 sudo dpkg --reconfigure -a
and press <Enter>, when asked for a password, enter your own (the one you use to log in).
The you can access to Synaptic again.
Hope this helps, let me know.

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

Hi,

Open a Terminal from the menu Applications → Accessories → Terminal and type:
(when the system ask you a password give your user password, you will not see nothing when you type it, then press enter)

sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get --fix-missing install
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get clean
sudo apt-get autoremove

Regards,

Mark

Revision history for this message
David (funniinnit) said :
#3

Hi Ariel,
Still got the same result, would not remove the broken package and the details given were the same.
Thanks..David

----- Original Message -----
From: Ariel Cabral
To: <email address hidden>
Sent: Wed, 28 Jan 2009 12:46:06 -0000
Subject: Re: [Question #58984]: No such file or directory

Your question #58984 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/58984

    Status: Open => Answered

Ariel Cabral proposed the following answer:
Open a Terminal and run:
 sudo dpkg --reconfigure -a
and press <Enter>, when asked for a password, enter your own (the one you use to log in).
The you can access to Synaptic again.
Hope this helps, let me know.

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/ubuntu/+question/58984/+confirm?answer_id=0

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/ubuntu/+question/58984

You received this question notification because you are a direct
subscriber of the question.

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

Hi,

Open a Terminal from the menu Applications → Accessories → Terminal and type:
(when the system ask you a password give your user password, you will not see nothing when you type it, then press enter)

sudo rm /var/lib/dpkg/available
sudo touch /var/lib/dpkg/available
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get --fix-missing install
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get clean
sudo apt-get autoremove

Regards,

Mark

Revision history for this message
David (funniinnit) said :
#5

Hi Mark,
Thanks for the help, did as you suggested and then still had broken package so tried to remove this
and got this message:"E: sun-java6-jre: Package is in a very bad inconsistent state - you should"

Please advise,
Many thanks
Dave

----- Original Message -----
From: Mark Rijckenberg
To: <email address hidden>
Sent: Wed, 28 Jan 2009 13:09:46 -0000
Subject: Re: [Question #58984]: No such file or directory

Your question #58984 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/58984

Mark Rijckenberg proposed the following answer:
Hi,

Open a Terminal from the menu Applications ��� Accessories ��� Terminal and type:
(when the system ask you a password give your user password, you will not see nothing when you type
it, then press enter)

sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get --fix-missing install
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get clean
sudo apt-get autoremove

Regards,

Mark

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/ubuntu/+question/58984/+confirm?answer_id=1

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/ubuntu/+question/58984

You received this question notification because you are a direct
subscriber of the question.

Revision history for this message
David (funniinnit) said :
#6

 Got some more information Mark;

dpkg: error processing sun-java6-jre (--purge): package is in very bad inconsistent state- you
should reinstall it before attempting a removal.
Errors were encountered while processing: sun-java6-jre
E: sub process/usr/bin/dpkg returned and error code (1)
A package failed to install. Trying to recover.

Hope this is of more help

Thanks
David

----- Original Message -----
From: Mark Rijckenberg
To: <email address hidden>
Sent: Wed, 28 Jan 2009 13:20:02 -0000
Subject: Re: [Question #58984]: No such file or directory

Your question #58984 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/58984

    Status: Open => Answered

Mark Rijckenberg proposed the following answer:
Hi,

Open a Terminal from the menu Applications ��� Accessories ��� Terminal and type:
(when the system ask you a password give your user password, you will not see nothing when you type
it, then press enter)

sudo rm /var/lib/dpkg/available
sudo touch /var/lib/dpkg/available
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get --fix-missing install
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get clean
sudo apt-get autoremove

Regards,

Mark

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/ubuntu/+question/58984/+confirm?answer_id=3

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/ubuntu/+question/58984

You received this question notification because you are a direct
subscriber of the question.

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

Hi,

Please follow instructions from marcobra here:

https://answers.launchpad.net/ubuntu/+source/sun-java6/+question/52934

If marcobra's instructions do not work, please send us output of following command:

cat /etc/apt/sources.list

Regards,

Mark

Revision history for this message
David (funniinnit) said :
#8

Hi Mark,

Didn't work so below is the output you requested. Regards David

deb http://gb.archive.ubuntu.com/ubuntu/ hardy main restricted multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://gb.archive.ubuntu.com/ubuntu/ hardy-updates main restricted multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ hardy-updates main restricted

## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
# deb http://gb.archive.ubuntu.com/ubuntu/ dapper universe
# deb-src http://gb.archive.ubuntu.com/ubuntu/ dapper universe

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://gb.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse
# deb-src http://gb.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu hardy-security main restricted multiverse
deb-src http://security.ubuntu.com/ubuntu hardy-security main restricted
# deb http://security.ubuntu.com/ubuntu dapper-security universe
# deb-src http://security.ubuntu.com/ubuntu dapper-security universe
funniinnit@funniinnit-laptop:~$

----- Original Message -----
From: Mark Rijckenberg
To: <email address hidden>
Sent: Wed, 28 Jan 2009 17:51:23 -0000
Subject: Re: [Question #58984]: No such file or directory

Your question #58984 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/58984

    Status: Open => Answered

Mark Rijckenberg proposed the following answer:
Hi,

Please follow instructions from marcobra here:

https://answers.launchpad.net/ubuntu/+source/sun-java6/+question/52934

If marcobra's instructions do not work, please send us output of
following command:

cat /etc/apt/sources.list

Regards,

Mark

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/ubuntu/+question/58984/+confirm?answer_id=6

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/ubuntu/+question/58984

You received this question notification because you are a direct
subscriber of the question.

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

Hi,

Your sources.list file looks fine. I don't understand why my previous suggestions don't work.

Sorry I cannot be of further help.

Regards,

Mark

Revision history for this message
David (funniinnit) said :
#10

Mark,
This is what I get when I try Marcobra's suggestion, the "software restricted" box is already
checked and I still have a broken package when I try to reload. If I then try to fix the broken
package I have the same result as before and if I ignore it and carry on with Marcobra's fix I get:
funniinnit@funniinnit-laptop:~$ sudo aptitude update
[sudo] password for funniinnit:
Hit http://archive.canonical.com hardy Release.gpg
Ign http://archive.canonical.com hardy/partner Translation-en_GB
Hit http://archive.ubuntu.com hardy Release.gpg
Hit http://archive.ubuntu.com hardy/main Translation-en_GB
Hit http://archive.canonical.com hardy Release
Hit http://archive.ubuntu.com hardy/restricted Translation-en_GB
Hit http://archive.ubuntu.com hardy/multiverse Translation-en_GB
Hit http://archive.ubuntu.com hardy/universe Translation-en_GB
Hit http://archive.ubuntu.com hardy-updates Release.gpg
Ign http://archive.ubuntu.com hardy-updates/main Translation-en_GB
Ign http://archive.ubuntu.com hardy-updates/restricted Translation-en_GB
Ign http://archive.ubuntu.com hardy-updates/multiverse Translation-en_GB
Ign http://archive.ubuntu.com hardy-updates/universe Translation-en_GB
Hit http://archive.ubuntu.com hardy-security Release.gpg
Ign http://archive.ubuntu.com hardy-security/main Translation-en_GB
Hit http://archive.canonical.com hardy/partner Packages
Ign http://archive.ubuntu.com hardy-security/restricted Translation-en_GB
Ign http://archive.ubuntu.com hardy-security/multiverse Translation-en_GB
Ign http://archive.ubuntu.com hardy-security/universe Translation-en_GB
Hit http://archive.ubuntu.com hardy-proposed Release.gpg
Hit http://archive.ubuntu.com hardy-proposed/restricted Translation-en_GB
Hit http://archive.ubuntu.com hardy-proposed/main Translation-en_GB
Hit http://archive.ubuntu.com hardy-proposed/multiverse Translation-en_GB
Ign http://archive.ubuntu.com hardy-proposed/universe Translation-en_GB
Hit http://archive.ubuntu.com hardy-backports Release.gpg
Ign http://archive.ubuntu.com hardy-backports/restricted Translation-en_GB
Ign http://archive.ubuntu.com hardy-backports/main Translation-en_GB
Ign http://archive.ubuntu.com hardy-backports/multiverse Translation-en_GB
Ign http://archive.ubuntu.com hardy-backports/universe Translation-en_GB
Hit http://archive.ubuntu.com hardy Release
Hit http://archive.ubuntu.com hardy-updates Release
Hit http://archive.ubuntu.com hardy-security Release
Hit http://archive.ubuntu.com hardy-proposed Release
Hit http://archive.ubuntu.com hardy-backports Release
Hit http://archive.ubuntu.com hardy/main Packages
Hit http://archive.ubuntu.com hardy/restricted Packages
Hit http://archive.ubuntu.com hardy/multiverse Packages
Hit http://archive.ubuntu.com hardy/universe Packages
Hit http://archive.ubuntu.com hardy-updates/main Packages
Hit http://archive.ubuntu.com hardy-updates/restricted Packages
Hit http://archive.ubuntu.com hardy-updates/multiverse Packages
Hit http://archive.ubuntu.com hardy-updates/universe Packages
Hit http://archive.ubuntu.com hardy-security/main Packages
Hit http://archive.ubuntu.com hardy-security/restricted Packages
Hit http://archive.ubuntu.com hardy-security/multiverse Packages
Hit http://archive.ubuntu.com hardy-security/universe Packages
Hit http://archive.ubuntu.com hardy-proposed/restricted Packages
Hit http://archive.ubuntu.com hardy-proposed/main Packages
Hit http://archive.ubuntu.com hardy-proposed/multiverse Packages
Hit http://archive.ubuntu.com hardy-proposed/universe Packages
Hit http://archive.ubuntu.com hardy-backports/restricted Packages
Hit http://archive.ubuntu.com hardy-backports/main Packages
Hit http://archive.ubuntu.com hardy-backports/multiverse Packages
Hit http://archive.ubuntu.com hardy-backports/universe Packages
Reading package lists... Done
funniinnit@funniinnit-laptop:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run ���apt-get -f install��� to correct these.
The following packages have unmet dependencies.
E: Unmet dependencies. Try using -f.
funniinnit@funniinnit-laptop:~$

Thank you for your help so far and if non of this makes sense to you then how do I go about
uninstalling Ubuntu? This has only happened since I upgraded from 6,06 to the latest version.
Regards David
----- Original Message -----
From: Mark Rijckenberg
To: <email address hidden>
Sent: Wed, 28 Jan 2009 17:51:23 -0000
Subject: Re: [Question #58984]: No such file or directory

Your question #58984 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/58984

    Status: Open => Answered

Mark Rijckenberg proposed the following answer:
Hi,

Please follow instructions from marcobra here:

https://answers.launchpad.net/ubuntu/+source/sun-java6/+question/52934

If marcobra's instructions do not work, please send us output of
following command:

cat /etc/apt/sources.list

Regards,

Mark

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/ubuntu/+question/58984/+confirm?answer_id=6

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/ubuntu/+question/58984

You received this question notification because you are a direct
subscriber of the question.

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

Hi,

I recommend booting from the Ubuntu 8.10 LiveCD and then installing Ubuntu 8.10 from the LiveCD session. That should solve your apt-get troubles and should not delete your homedirectory contents. This new install will just overwrite the previous Ubuntu system files.

I personally avoid using apt-get. I use aptitude instead when trying to install packages. I also avoid using update-manager or aptitude dist-upgrade when upgrading to a newer version of Ubuntu. I have less upgrade issues when I just install a new major release from the LiveCD session.

Just my personal point of view,

Regards,

Mark

Revision history for this message
David (funniinnit) said :
#12

Thanks Mark I'll do that,
All the very best
David

----- Original Message -----
From: Mark Rijckenberg
To: <email address hidden>
Sent: Thu, 29 Jan 2009 09:29:22 -0000
Subject: Re: [Question #58984]: No such file or directory

Your question #58984 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/58984

    Status: Open => Answered

Mark Rijckenberg proposed the following answer:
Hi,

I recommend booting from the Ubuntu 8.10 LiveCD and then installing
Ubuntu 8.10 from the LiveCD session. That should solve your apt-get
troubles and should not delete your homedirectory contents. This new
install will just overwrite the previous Ubuntu system files.

I personally avoid using apt-get. I use aptitude instead when trying to
install packages. I also avoid using update-manager or aptitude dist-
upgrade when upgrading to a newer version of Ubuntu. I have less upgrade
issues when I just install a new major release from the LiveCD session.

Just my personal point of view,

Regards,

Mark

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/ubuntu/+question/58984/+confirm?answer_id=10

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/ubuntu/+question/58984

You received this question notification because you are a direct
subscriber of the question.

Revision history for this message
Ariel Cabral (acabral1961) said :
#13

Hi David,
The upgrade from 6.06LTS to 8.04LTS finished 0k?

If yes, Open a Terminal and then execute again:
 sudo apt-get -f install
 sudo apt-get clean
 sudo apt-get autoremove

If not, maybe your issue is related with this bug:
https://bugs.edge.launchpad.net/ubuntu/+source/cyrus-sasl2/+bug/213482
Hope this helps, let me know.

Revision history for this message
Ariel Cabral (acabral1961) said :
#14

And please, paste the output of each command here.

Revision history for this message
David (funniinnit) said :
#15

Hi Ariel,
Thank you for your suggestion, it was after I upgraded to 8;04 from 6;06 that I first encountered
the problem. Mark Rijckenberg has suggested that I download 8;10, put it on a CD and load this
version to eliminate my problem. This is what I intend to do as this is how I first got rid of
windows and loaded 6;06.
Question: Is there a checking program that I can download to check the 8;10 CD before I install
it? If so will you please send a link to this program.
Many thanks for your help
Kindest regards..David

----- Original Message -----
From: Ariel Cabral
To: <email address hidden>
Sent: Thu, 29 Jan 2009 10:58:46 -0000
Subject: Re: [Question #58984]: No such file or directory

Your question #58984 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/58984

Ariel Cabral proposed the following answer:
And please, paste the output of each command here.

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/ubuntu/+question/58984/+confirm?answer_id=13

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/ubuntu/+question/58984

You received this question notification because you are a direct
subscriber of the question.

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#16

Have you already tried to type ina terminal:

sudo apt-get -f install

Hope this helps

Can you help with this problem?

Provide an answer of your own, or ask David for more information if necessary.

To post a message you must log in.