LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 10-08-2011, 10:22 AM   #1
bpeacocke
LQ Newbie
 
Registered: Jul 2011
Location: Cape Town
Posts: 5

Rep: Reputation: Disabled
Exclamation apt-get install pkg_name returns "update-alternatives: command not found"


I am trying to install the "make" package (and various others) in order to successfully compile chkrootkit but I always get an error that "update-alternatives" is not found.
I tried to install chkconfig (in order to "recover" alternatives" however it too gives me the same error.
Here is the full result from the apt-get command (I am logged on as root):

# apt-get install make
Reading package lists... Done
Building dependency tree
Reading state information... Done
make is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 79 not upgraded.
4 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up cpp (4:4.3.2-2) ...
/var/lib/dpkg/info/cpp.postinst: line 3: update-alternatives: command not found
dpkg: error processing cpp (--configure):
subprocess post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of gcc:
gcc depends on cpp (>= 4:4.3.2-2); however:
Package cpp is not configured yet.
dpkg: error processing gcc (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of g++:
g++ depends on cpp (>= 4:4.3.2-2); however:
Package cpp is not configured yet.
g++ depends on gcc (>= 4:4.3.2-2); however:
Package gcc is not configured yet.
dpkg: error processing g++ (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of build-essential:
build-essential depends on g++ (>= 4:4.3.1); however:
Package g++ is not configured yet.
dpkg: error processing build-essential (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
cpp
gcc
g++
build-essential
E: Sub-process /usr/bin/dpkg returned an error code (1)

Anyone have any ideas how I can fix this problem??
 
Old 10-08-2011, 10:58 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 1,691

Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
What do you get when you run:

apt-get install chkconfig
 
Old 10-08-2011, 11:16 AM   #3
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,234

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
"update-alternatives" is in package "dpkg". Try reinstalling this. Also check
Code:
echo $PATH
whereis update-alternatives

Last edited by eSelix; 10-08-2011 at 11:20 AM.
 
Old 10-12-2011, 12:51 AM   #4
bpeacocke
LQ Newbie
 
Registered: Jul 2011
Location: Cape Town
Posts: 5

Original Poster
Rep: Reputation: Disabled
Answer to suggestion 1:
-----------------------
apt-get install chkconfig
Reading package lists... Done
Building dependency tree
Reading state information... Done
chkconfig is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 79 not upgraded.
4 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up cpp (4:4.3.2-2) ...
/var/lib/dpkg/info/cpp.postinst: line 3: update-alternatives: command not found
dpkg: error processing cpp (--configure):
subprocess post-installation script returned error exit status 127
...
 
Old 10-12-2011, 12:54 AM   #5
bpeacocke
LQ Newbie
 
Registered: Jul 2011
Location: Cape Town
Posts: 5

Original Poster
Rep: Reputation: Disabled
Smile Eureka!

Thanks smallpond!! I reinstalled dpkg and that did the trick!
 
Old 10-12-2011, 10:16 PM   #6
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 1,691

Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
Quote:
Originally Posted by bpeacocke View Post
Thanks smallpond!! I reinstalled dpkg and that did the trick!
Thank eSelix who at least told you the right package.
 
  


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 update stuck with "A copy of the C library was found in an unexpected directory" exoool Debian 20 10-31-2011 05:33 AM
Command "mail" returns "panic: temporary file seek" kenneho Linux - Software 5 12-23-2008 04:27 AM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 11:18 PM
alsaconf returns error msg "getopt: command not found" bezdomny Linux - Hardware 4 07-13-2007 10:20 AM
executing a loaded module returns "command not found" error neelay1 Linux - Software 1 05-08-2006 03:25 PM


All times are GMT -5. The time now is 01:51 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