LinuxAnswers - the LQ Linux tutorial section.
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 09-20-2006, 09:35 AM   #1
LQ Newbie
Registered: Jul 2006
Posts: 6

Rep: Reputation: 0
Unhappy I've broken apt-get/synaptic due to insalling a .deb file


I recently tried to install jedit on my ubuntu machine. I tried doing this by using the debian package on the jedit download page (cant post url due to low post level)

Unfortunately I didnt spot the apt-get instructions at the bottom of the page.

The command I used to install was: dpkg -i jedit_4.3pre6_all.deb

The install failed (sorry I dont have any error message output for that anymore), and has now left me unable to use apt-get or synaptic.

Whenever I try to install anything using apt-get I get this message:

Reading package lists... Done
Building dependency tree... Done
E: The package jedit needs to be reinstalled, but I can't find an archive for it.

If I try apt-get remove jedit, I get exactly the same message.

I also get a similar error when starting synaptic:

E: The package jedit needs to be reinstalled, but I can't find an archive for it.
E: Internal error opening cache (1). Please report.

and synaptic then doesnt reposond to search.

I also was not able to post my sources file due to my low post level so far, please let me know if there is anything else I can include to help sort out this problem. Im quite new to linux and apt-get and synaptic are the only methods I know to get software/updates, so this is quite an urgent matter for me to resolve.

Thanks in advance for any help

Old 09-20-2006, 09:43 AM   #2
Senior Member
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,189

Rep: Reputation: 49
I just did a search on for jedit and it didnt give anything out, so that should mean it wouldnt be available on the default repos. thats the reason your getting the errors, its not that you have broken apt-get or something.
try installing again from the deb package, and show us the error that you get, you are probably just missing some dependencies.
Old 09-20-2006, 10:27 AM   #3
LQ Newbie
Registered: Jul 2006
Posts: 6

Original Poster
Rep: Reputation: 0
These are the messages as a result of running: dpkg -i jedit_4.3pre6_all.deb

I should mention that after the original attempt to install jedit I managed to install it via the java installer file. Just mentioning in case its relevant to any of the following messages:

Selecting previously deselected package jedit.
(Reading database ...
dpkg: serious warning: files list file for package `jedit' missing, assuming package has no files currently installed.
116616 files and directories currently installed.)
Preparing to replace jedit 4: (using jedit_4.3pre6_all.deb) ...
Unpacking replacement jedit ...
dpkg: error processing jedit_4.3pre6_all.deb (--install):
unable to create `./usr/lib/menu/jedit': No such file or directory
dpkg (subprocess): unable to execute new post-removal script: No such file or directory
dpkg: error while cleaning up:
subprocess post-removal script returned error exit status 2
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:

Thanks again

Old 09-22-2006, 04:35 AM   #4
LQ Newbie
Registered: Jul 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Hi All

Has anybody got any advice on fixing the above problem?


Old 09-23-2006, 09:39 PM   #5
Registered: Jan 2004
Posts: 307

Rep: Reputation: 33
try using apt-get instead of dpkg. apt-get selects and downloads the files it needs from the repositories and then uses dpkg to install them. Dpkg installs packages but doesn't go looking for them.
first, type
dselect update
to update apt-get's files list, then
apt-get -f install
which may solve the problem. (the -f means fix...apt-get should go looking for the missing files).
Post back whether this works or not.
Will post a brief outline of using apt-get later...busy right now.
Old 09-23-2006, 11:30 PM   #6
Senior Member
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 61
# dpkg --purge jedit
Old 09-24-2006, 08:49 PM   #7
Registered: Jan 2004
Posts: 307

Rep: Reputation: 33
Here's a brief overview of installing packages in a Debian based system:

Actual package installation is done by dpkg. This is a text based application. For an already downloaded package you could do 'dpkg -i <path & package name>. But this may fail because there may be dependencies which dpkg does not know how to find and has not been told to install.

So the next level is apt-get which will search the net for the packages it needs (including dependency packages), download and install them. It uses dpkg to do the actual install and maintains a file called /etc/apt/sources.list to know where to search for packages. This file must be updated regularly as packages get moved around in the internet repositories. This is done with the command 'apt-get update'.

But to use apt-get you must know what packages are available, so you will need a 'package browser list.

The most basic of these is dselect, which is text based and not overly user friendly. It also maintains a package available database file which must be updated regularly with 'dselect update'. I've been told that dselect update will update both the dselect database and the apt-get sources.list so it is preferable to use this instead of the 'apt-get update' command which only updates apt sources.list.

More user friendly alternatives for seaching for packages are the gui based applications Kpackage and Synaptic. Both of these provide information on the packages available and can download and install the package.

Dselect, Kpackage and Synaptic all use apt-get to do the actual downloading & installing.

Debian based systems must use either Debian packages or applications compiled from source. To install an RPM package, first convert it to a .deb using 'alien'.
ie: alien -d <rpm packagename>

So, for an already download package, you can try dpkg -i <package> but be prepared for dependency problems which you will have to solve yourself by manually tacking down and installing any required dependencies.

Better way is to use apt-get & let it redo the download:

First, you must become 'root'. Permissions are a big thing in Linux, only root (administrator level permissions) is allowed to install things. So, type 'su' to become root. Then do 'dselect update'. Usually the first time it is run it will need to download quite a bit & some of the downloads may fail. If this happens, just run the command again, eventually it will get all the data it needs.

then 'apt-get install <your package>'. For example, to install firefox do 'apt-get install firefox'. It should download the application & all required dependencies & install the application.

Selecting 'firefox' from Kpackage & following the install procedure (check mark & install marked, etc) should do the same thing. But you do have to 'dselect update' first. Kpackage is going to ask you for a root password so you will have to set one before you run it.
Old 09-25-2006, 05:20 AM   #8
LQ Newbie
Registered: Jul 2006
Posts: 6

Original Poster
Rep: Reputation: 0

Thanks for your reponses, sadly I am still no further forward.

After running dselect update, I get the following:

sudo dselect update
Get: 1 dapper-security Release.gpg [189B]
Get: 2 dapper-security Release [30.9kB]
Get: 3 dapper Release.gpg [189B]
Get: 4 dapper-updates Release.gpg [189B]
Get: 5 dapper-security/main Sources [12.4kB]
Get: 6 dapper-security/universe Packages [18.9kB]
Get: 7 dapper Release.gpg [189B]
Get: 8 dapper-updates Release.gpg [189B]
Get: 9 dapper-security/main Packages [50.2kB]
Get: 10 dapper-security/restricted Packages [4496B]
Get: 11 dapper-security/multiverse Packages [2159B]
Get: 12 dapper-backports Release.gpg [189B]
Get: 13 dapper-backports Release.gpg [189B]
Get: 14 dapper-security/universe Sources [2702B]
Hit dapper-updates Release
Hit dapper Release
Hit dapper Release
Hit dapper-updates Release
Get: 15 dapper-backports Release [23.3kB]
Get: 16 dapper-backports Release [23.3kB]
Hit dapper/main Sources
Hit dapper-updates/main Packages
Hit dapper/restricted Sources
Get: 17 dapper-updates/restricted Packages [14B]
Hit dapper/universe Sources
Hit dapper-updates/universe Packages
Hit dapper-updates/main Sources
Hit dapper-updates/multiverse Packages
Get: 18 dapper-updates/restricted Sources [14B]
Hit dapper/universe Packages
Get: 19 dapper-backports/main Sources [3489B]
Hit dapper/main Packages
Hit dapper/restricted Packages
Get: 20 dapper-backports/restricted Sources [14B]
Hit dapper/multiverse Packages
Get: 21 dapper-backports/universe Sources [5556B]
Get: 22 dapper-backports/main Packages [7279B]
Get: 23 dapper-backports/restricted Packages [14B]
Get: 24 dapper-backports/multiverse Sources [653B]
Get: 25 dapper-backports/universe Packages [13.9kB]
Get: 26 dapper-backports/multiverse Packages [1130B]
Ign ./ Release.gpg
Ign ./ Release
Ign ./ Packages
Ign ./ Sources
Hit ./ Packages
Hit ./ Sources
Fetched 202kB in 1m3s (3170B/s)
Reading package lists... Done
Merging available information
Replacing available packages info, using /var/cache/apt/available.
Information about 18873 package(s) was updated.

I then ran sudo apt-get -f install and got:

Reading package lists... Done
Building dependency tree... 0%
Building dependency tree... Done
E: The package jedit needs to be reinstalled, but I can't find an archive for it.

which is becoming an all too fammiliar message.

So I tried: dpkg --purge jedit
dpkg: error processing jedit (--purge):
Package is in a very bad inconsistent state - you should
reinstall it before attempting a removal.
Errors were encountered while processing:

Any other ideas?

thanks for all the suggestions so far and the excellent write up of dselect, apt-get etc.

Old 09-25-2006, 10:48 AM   #9
Registered: Jan 2004
Posts: 307

Rep: Reputation: 33
Hmmm. Looks like it really is a bad package.
So maybe try forcing dpkg to remove it.
From 'man dpkg' (section on forcing options) gives:
remove-reinstreq: Remove a package, even if it's broken and marked to  require
              reinstallation. This may, for example, cause parts of the package to remain on
              the system, which will then be forgotten by dpkg.
So try
dpkg --force-remove-reinstreq --purge jedit
Old 09-25-2006, 11:02 AM   #10
LQ Newbie
Registered: Jul 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Talking It worked!

That worked, Thanks!

Your help is very much appreciated, thought I might have been looking at a reinstall.



apt-get, synaptic

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can not run Update Manager; Synaptic broken sixgun Linux - General 3 08-12-2006 02:02 AM
apt-get broken due to jre package pyromania Ubuntu 5 02-08-2006 08:48 PM
How to update missing/broken file in deb package pinknick Debian 3 01-15-2006 05:06 AM
Synaptic always considers OpenCV-0.9.6 broken? Any idea? jiapei100 Linux - Software 1 03-07-2005 05:52 AM
Making synaptic ignore broken packages ???? UsualTuxpect Linux - Software 5 09-05-2004 11:29 PM

All times are GMT -5. The time now is 09:32 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration