LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-16-2014, 06:09 AM   #1
ilesterg
Member
 
Registered: Jul 2012
Location: München
Distribution: Debian, CentOS/RHEL
Posts: 587

Rep: Reputation: 72
messed up dpkg - google-chrome-stable Package is in a very bad inconsistent state


Hi all,

I previously tried to install google chrome in a custom location and ended up with the following error message:

Code:
poo@rocket:/home/applications/chrome$ sudo dpkg --instdir=/home/applications/chrome/ -i google-chrome-stable_current_i386\(1\).deb 
Selecting previously unselected package google-chrome-stable.
(Reading database ... 157321 files and directories currently installed.)
Preparing to replace google-chrome-stable 33.0.1750.152-1 (using google-chrome-stable_current_i386(1).deb) ...
dpkg (subprocess): admindir must be inside instdir for dpkg to work properly
dpkg: warning: subprocess old pre-removal script returned error exit status 2
dpkg: trying script from the new package instead ...
dpkg (subprocess): admindir must be inside instdir for dpkg to work properly
dpkg: error processing google-chrome-stable_current_i386(1).deb (--install):
 subprocess new pre-removal script returned error exit status 2
dpkg (subprocess): admindir must be inside instdir for dpkg to work properly
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 google-chrome-stable_current_i386(1).deb
poo@rocket:/home/applications/chrome$
I can no longer install any other software in my system. I even tried

Code:
sudo dpkg --remove --force-remove-reinstreq google-chrome-stable
but nothing good happened

Code:
poo@rocket:~$ sudo apt-get install k9copy
[sudo] password for poo: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: The package google-chrome-stable needs to be reinstalled, but I can't find an archive for it.
poo@rocket:~$ sudo dpkg --remove --force-remove-reinstreq google-chrome-stable
dpkg: warning: overriding problem because --force enabled:
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
(Reading database ... 159625 files and directories currently installed.)
Removing google-chrome-stable ...
xdg-icon-resource: size argument must be numeric
Try 'xdg-icon-resource --help' for more information.
dpkg: error processing google-chrome-stable (--remove):
 subprocess installed pre-removal script returned error exit status 1
xdg-icon-resource: size argument must be numeric
Try 'xdg-icon-resource --help' for more information.
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 google-chrome-stable
poo@rocket:~$
How do I just clean google-chrome-stable out of my system, or, as the error suggests, complete the install first? Many thanks!
 
Old 03-16-2014, 09:38 AM   #2
ilesterg
Member
 
Registered: Jul 2012
Location: München
Distribution: Debian, CentOS/RHEL
Posts: 587

Original Poster
Rep: Reputation: 72
just to add,

Code:
sudo apt-get install -f
doesn't help either
 
Old 03-16-2014, 09:41 AM   #3
ilesterg
Member
 
Registered: Jul 2012
Location: München
Distribution: Debian, CentOS/RHEL
Posts: 587

Original Poster
Rep: Reputation: 72
I tried opening Synaptic Package Manager and got this:
Code:
E: The package google-chrome-stable needs to be reinstalled, but I can't find an archive for it.
E: Internal error opening cache (1). Please report.
 
Old 03-16-2014, 10:36 AM   #4
ilesterg
Member
 
Registered: Jul 2012
Location: München
Distribution: Debian, CentOS/RHEL
Posts: 587

Original Poster
Rep: Reputation: 72
Finally!!!!!!

This did the trick:

Code:
sudo find /var/lib/dpkg -exec grep -l "google-chrome-stable" {} \;

sudo gedit /var/lib/dpkg/info/google-chrome-stable.prerm
added exit 0 as the first line, then

Code:
sudo dpkg -P google-chrome-stable
cheers!!

credits to this
 
Old 07-03-2014, 11:10 AM   #5
pHantom7
LQ Newbie
 
Registered: Jul 2014
Posts: 1

Rep: Reputation: Disabled
Thanks

@ilesterg thanks man! Tried creating a symbolic link of java for chrome and don't know how, but in the process messed up with chrome. This really helped
Cheers

Last edited by pHantom7; 07-03-2014 at 11:12 AM.
 
Old 07-03-2014, 02:45 PM   #6
ilesterg
Member
 
Registered: Jul 2012
Location: München
Distribution: Debian, CentOS/RHEL
Posts: 587

Original Poster
Rep: Reputation: 72
No problem.
 
Old 12-30-2015, 01:30 AM   #7
zvolsky
LQ Newbie
 
Registered: Dec 2015
Posts: 1

Rep: Reputation: Disabled
Thanks

Nice trick.
 
Old 02-09-2022, 12:46 AM   #8
Rasthro
LQ Newbie
 
Registered: Feb 2022
Posts: 1

Rep: Reputation: 0
I also have this problem,The solution wont work for me :(

user@LAPTOP-AUT1G625:~$ sudo dpkg --purge google-chrome-stable
dpkg: error processing package google-chrome-stable (--purge):
package is in a very bad inconsistent state; you should
reinstall it before attempting a removal
Errors were encountered while processing:
google-chrome-stable
 
Old 02-09-2022, 03:46 AM   #9
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
1. Don't hijack a solved thread, open your own.

2. What is your Linux distribution including release and architecture? What is the Google Chrome version you're trying to remove?

3. Did you try to reinstall the package as suggested in the message? What was the result?

4. Why are you trying to remove it with dpkg in the first place? Did a previous attempt with apt failed? If so, what was the error message?

5. Provide the output of
Code:
dpkg -C google-chrome-stable
dpkg -V google-chrome-stable
6. What you quoted couldn't be the only error message output by dpkg. Were all the other messages exactly the same as in the top post of this thread?

7. You said the trick suggested in the thread didn't work for you. That is a very advanced trick involving editing the pre-removal script of a package. Did you understand it? Did you correctly apply it?

Last edited by shruggy; 02-09-2022 at 04:12 AM.
 
  


Reply

Tags
chrome, debian, dpkg


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
LXer: Google Releases Chrome 24 Stable for Linux LXer Syndicated Linux News 0 01-11-2013 01:40 AM
LXer: Google Releases Chrome 17 Stable LXer Syndicated Linux News 0 02-08-2012 10:00 PM
LXer: Google releases Chrome 8.0 stable LXer Syndicated Linux News 0 12-04-2010 11:30 AM
LXer: Google Chrome 8.0 Stable for Linux Released LXer Syndicated Linux News 0 12-03-2010 11:00 AM
LXer: Faster, Stable Google Chrome 3 LXer Syndicated Linux News 0 09-18-2009 01:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:02 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration