LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

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

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


Hi

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

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

Rep: Reputation: 49
I just did a search on packages.ubuntu.com 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, 09:27 AM   #3
grahamu
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:04.03.06.00 (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:
jedit_4.3pre6_all.deb

Thanks again

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

Original Poster
Rep: Reputation: 0
Hi All

Has anybody got any advice on fixing the above problem?

Thanks

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

Rep: Reputation: 32
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
Code:
dselect update
to update apt-get's files list, then
Code:
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, 10:30 PM   #6
rickh
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: 60
# dpkg --purge jedit
 
Old 09-24-2006, 07:49 PM   #7
CrashedAgain
Member
 
Registered: Jan 2004
Posts: 307

Rep: Reputation: 32
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, 04:20 AM   #8
grahamu
LQ Newbie
 
Registered: Jul 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Hi

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

After running dselect update, I get the following:

sudo dselect update
Get: 1 http://security.ubuntu.com dapper-security Release.gpg [189B]
Get: 2 http://security.ubuntu.com dapper-security Release [30.9kB]
Get: 3 http://gb.archive.ubuntu.com dapper Release.gpg [189B]
Get: 4 http://archive.ubuntu.com dapper-updates Release.gpg [189B]
Get: 5 http://security.ubuntu.com dapper-security/main Sources [12.4kB]
Get: 6 http://security.ubuntu.com dapper-security/universe Packages [18.9kB]
Get: 7 http://archive.ubuntu.com dapper Release.gpg [189B]
Get: 8 http://gb.archive.ubuntu.com dapper-updates Release.gpg [189B]
Get: 9 http://security.ubuntu.com dapper-security/main Packages [50.2kB]
Get: 10 http://security.ubuntu.com dapper-security/restricted Packages [4496B]
Get: 11 http://security.ubuntu.com dapper-security/multiverse Packages [2159B]
Get: 12 http://gb.archive.ubuntu.com dapper-backports Release.gpg [189B]
Get: 13 http://archive.ubuntu.com dapper-backports Release.gpg [189B]
Get: 14 http://security.ubuntu.com dapper-security/universe Sources [2702B]
Hit http://archive.ubuntu.com dapper-updates Release
Hit http://gb.archive.ubuntu.com dapper Release
Hit http://archive.ubuntu.com dapper Release
Hit http://gb.archive.ubuntu.com dapper-updates Release
Get: 15 http://archive.ubuntu.com dapper-backports Release [23.3kB]
Get: 16 http://gb.archive.ubuntu.com dapper-backports Release [23.3kB]
Hit http://gb.archive.ubuntu.com dapper/main Sources
Hit http://archive.ubuntu.com dapper-updates/main Packages
Hit http://gb.archive.ubuntu.com dapper/restricted Sources
Get: 17 http://archive.ubuntu.com dapper-updates/restricted Packages [14B]
Hit http://gb.archive.ubuntu.com dapper/universe Sources
Hit http://archive.ubuntu.com dapper-updates/universe Packages
Hit http://gb.archive.ubuntu.com dapper-updates/main Sources
Hit http://archive.ubuntu.com dapper-updates/multiverse Packages
Get: 18 http://gb.archive.ubuntu.com dapper-updates/restricted Sources [14B]
Hit http://archive.ubuntu.com dapper/universe Packages
Get: 19 http://gb.archive.ubuntu.com dapper-backports/main Sources [3489B]
Hit http://archive.ubuntu.com dapper/main Packages
Hit http://archive.ubuntu.com dapper/restricted Packages
Get: 20 http://gb.archive.ubuntu.com dapper-backports/restricted Sources [14B]
Hit http://archive.ubuntu.com dapper/multiverse Packages
Get: 21 http://gb.archive.ubuntu.com dapper-backports/universe Sources [5556B]
Get: 22 http://archive.ubuntu.com dapper-backports/main Packages [7279B]
Get: 23 http://archive.ubuntu.com dapper-backports/restricted Packages [14B]
Get: 24 http://gb.archive.ubuntu.com dapper-backports/multiverse Sources [653B]
Get: 25 http://archive.ubuntu.com dapper-backports/universe Packages [13.9kB]
Get: 26 http://archive.ubuntu.com dapper-backports/multiverse Packages [1130B]
Ign http://dl.sourceforge.net ./ Release.gpg
Ign http://dl.sourceforge.net ./ Release
Ign http://dl.sourceforge.net ./ Packages
Ign http://dl.sourceforge.net ./ Sources
Hit http://dl.sourceforge.net ./ Packages
Hit http://dl.sourceforge.net ./ 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:
jedit

Any other ideas?

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

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

Rep: Reputation: 32
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:
Code:
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
Code:
dpkg --force-remove-reinstreq --purge jedit
 
Old 09-25-2006, 10:02 AM   #10
grahamu
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.

Graham
 
  


Reply

Tags
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 01:02 AM
apt-get broken due to jre package pyromania Ubuntu 5 02-08-2006 07:48 PM
How to update missing/broken file in deb package pinknick Debian 3 01-15-2006 04:06 AM
Synaptic always considers OpenCV-0.9.6 broken? Any idea? jiapei100 Linux - Software 1 03-07-2005 04:52 AM
Making synaptic ignore broken packages ???? UsualTuxpect Linux - Software 5 09-05-2004 10:29 PM


All times are GMT -5. The time now is 04:44 PM.

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