LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-05-2012, 11:05 AM   #1
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 365

Rep: Reputation: 30
Missing PreRemoval Script breaks dpkg.


I tried to purge the installation of a broken package, which I understood removed the entire package, configuration files, everything.

When I still couldn't install the package again, I looked at the files in /usr/lib/ and notioced that the packages files were still there.

This is where I did something really silly; I manually deleted directories containing the package.

I then downloaded the latest DEB files and tried to install the package from scratch.

This is the error I get:

Quote:
sudo dpkg -i Downloads/fpc_2.6.0-120824_amd64.deb
(Reading database ... 381019 files and directories currently installed.)
Preparing to replace fpc 2.7.1 (using .../fpc_2.6.0-120824_amd64.deb) ...
sed: can't read /usr/lib/fpc/2.7.1/fpc-cross.cfg: No such file or directory
dpkg: warning: subprocess old pre-removal script returned error exit status 2
dpkg - trying script from the new package instead ...
sed: can't read /usr/lib/fpc/2.6.0/fpc-cross.cfg: No such file or directory
dpkg: error processing Downloads/fpc_2.6.0-120824_amd64.deb (--install):
subprocess new pre-removal script returned error exit status 2
sh: Can't open /usr/lib/fpc/2.7.1/samplecfg
touch: cannot touch `/usr/lib/fpc/2.7.1/fpc-cross.cfg': No such file or directory
sed: can't read /usr/lib/fpc/2.7.1/fpc-cross.cfg: No such file or directory
/var/lib/dpkg/info/fpc.postinst: 8: cannot create /usr/lib/fpc/2.7.1/fpc-cross.cfg: Directory nonexistent
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
Downloads/fpc_2.6.0-120824_amd64.deb
Is there a way of getting apt-get or dpkg to disregard the prior installation? Failing which how easy is it to resurrect deleted files? I used "rm -rf".

The machine has Linux Mint Lisa.
 
Old 12-05-2012, 03:52 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,543

Rep: Reputation: 2509Reputation: 2509Reputation: 2509Reputation: 2509Reputation: 2509Reputation: 2509Reputation: 2509Reputation: 2509Reputation: 2509Reputation: 2509Reputation: 2509
I'd suggest that you try installing the package with :

sudo dpkg -i --force-all fpc_2.6.0-120824_amd64.deb
... if that's the package you originally had installed.

In Ubuntu and probably also Mint version ? ,
the package fpc_2.6.0 is just a 6.5 kB metapackage that pulls all "fp" :
http://packages.ubuntu.com/quantal/fpc-2.6.0
( fpc_2.6.0-120824_amd64.deb from sourcforge.jp is 34 MB.)

.
 
Old 12-06-2012, 05:45 AM   #3
cov
Member
 
Registered: Apr 2005
Location: Durban
Posts: 365

Original Poster
Rep: Reputation: 30
Hi Knudfi, thanks for the help.

It's not really working, I'm afraid, apt-get seems to be totally borked.

Quote:
sudo dpkg -i --force-all fpc_2.6.0-120824_amd64.deb
dpkg: error processing fpc_2.6.0-120824_amd64.deb (--install):
cannot access archive: No such file or directory
Errors were encountered while processing:
fpc_2.6.0-120824_amd64.deb
In view of the other issue you helped me with (namely gcc not compiling properly), it's probably not worth trying to fix it and reinstallation is most likely a better bet.

This time I'll upgrade to Vanilla Ubuntu as the derivatives seem to throw up slight problems.
 
Old 12-06-2012, 09:23 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,543

Rep: Reputation: 2509Reputation: 2509Reputation: 2509Reputation: 2509Reputation: 2509Reputation: 2509Reputation: 2509Reputation: 2509Reputation: 2509Reputation: 2509Reputation: 2509
Quote:
cannot access archive: No such file or directory
Are you in the wrong directory ? ( Please use the pwd command.)

I.e. : sudo dpkg -i --force-all Downloads/fpc_2.6.0-120824_amd64.deb ,
if that's where the package is.

Or :
cd Downloads/ && sudo dpkg -i --force-all fpc_2.6.0-120824_amd64.deb
 
  


Reply


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
apt-get dpkg error: files list file ... missing final newline PBSchmidt Debian 9 12-11-2012 05:14 AM
DPKG install problem - files list file missing castalla2007 Linux - Newbie 0 07-07-2011 04:44 AM
Unable to install new package-updates... missing /info folder from /var/lib/dpkg/ bradb-acc Ubuntu 4 07-15-2008 02:24 AM
DPKG Package List Missing Bottesford Linux - Newbie 4 01-07-2008 02:40 PM
broken system. libc6 is missing, dpkg and apt-get not working. help!!! hisnumber666 Linux - Software 3 05-01-2006 07:20 PM


All times are GMT -5. The time now is 05:52 AM.

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