Results 1 to 4 of 4

Thread: Alternative Path Doesn't Exist Error

  1. #1
    Join Date
    Nov 2010
    Beans
    46

    Alternative Path Doesn't Exist Error

    When i try to install build-esential using
    Code:
    sudo apt-get install build-essential
    I get the error
    Code:
    update-alternatives: error: alternative path /usr/bin/gcc doesn't exist
    Any ideas on how to fix this?

  2. #2
    Join Date
    May 2010
    Location
    Tewkesbury uk
    Beans
    7,625
    Distro
    Ubuntu Development Release

    Re: Alternative Path Doesn't Exist Error

    Hi

    Please post the output, from a terminal, for these commands

    Code:
    ls -l /usr/bin/gcc
    Code:
    dpkg -l gcc
    Code:
    dpkg --audit
    Code:
    update-alternatives --get-selections | grep gcc
    Code:
    update-alternatives --display cc
    Code:
    dpkg-divert --list "*gcc*"
    and finally.

    Code:
    sudo apt-get -f install
    Kind regards
    Join us on irc at #ubuntuforums. For web chat see here

    If you believe everything you read, you better not read. ~ Japanese Proverb

    Do not read newspapers on an empty stomach ~ Russian Proverb ~ BrunoLotse

  3. #3
    Join Date
    Nov 2010
    Beans
    46

    Re: Alternative Path Doesn't Exist Error

    Quote Originally Posted by matt_symes View Post
    Hi

    Please post the output, from a terminal, for these commands

    Code:
    ls -l /usr/bin/gcc
    Code:
    dpkg -l gcc
    Code:
    dpkg --audit
    Code:
    update-alternatives --get-selections | grep gcc
    Code:
    update-alternatives --display cc
    Code:
    dpkg-divert --list "*gcc*"
    and finally.

    Code:
    sudo apt-get -f install
    Kind regards
    Code:
    doudou@Pumpkin-Ubuntu:~$ ls -l /usr/bin/gcc
    lrwxrwxrwx 1 root root 7 Mar 13  2012 /usr/bin/gcc -> gcc-4.6
    Code:
    doudou@Pumpkin-Ubuntu:~$ sudo dpkg -l gcc
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name           Version        Description
    +++-==============-==============-============================================
    iF  gcc            4:4.6.3-1ubunt GNU C compiler
    Code:
    sudo dpkg --audit
    The following packages have been unpacked but not yet configured.
    They must be configured using dpkg --configure or the configure
    menu option in dselect for them to work:
     g++                  GNU C++ compiler
     build-essential      Informational list of build-essential packages
    
    The following packages are only half configured, probably due to problems
    configuring them the first time.  The configuration should be retried using
    dpkg --configure <package> or the configure menu option in dselect:
     gcc                  GNU C compiler
    Code:
    doudou@Pumpkin-Ubuntu:~$ update-alternatives --get-selections | grep gcc
    doudou@Pumpkin-Ubuntu:~$
    Code:
    doudou@Pumpkin-Ubuntu:~$ update-alternatives --display cc
    update-alternatives: error: no alternatives for cc.
    Code:
    doudou@Pumpkin-Ubuntu:~$ sudo dpkg-divert --list "*gcc*"
    doudou@Pumpkin-Ubuntu:~$
    Code:
    doudou@Pumpkin-Ubuntu:~$ sudo apt-get -f install
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    3 not fully installed or removed.
    After this operation, 0 B of additional disk space will be used.
    Setting up gcc (4:4.6.3-1ubuntu5) ...
    update-alternatives: error: alternative path /usr/bin/gcc doesn't exist.
    dpkg: error processing gcc (--configure):
     subprocess installed post-installation script returned error exit status 2
    dpkg: dependency problems prevent configuration of g++:
     g++ depends on gcc (>= 4:4.6.3-1ubuntu5); 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 gcc (>= 4:4.4.3); however:
      Package gcc is not configured yet.
     build-essential depends on g++ (>= 4:4.4.3); however:
      Package g++ is not configured yet.
    dpkg: error processing build-essential (--configure):
     dependency problems - leaving unconfigured
    No apport report written because the error message indicates its a followup error from a previous failure.
                              No apport report written because the error message indicates its a followup error from a previous failure.
                                                        Errors were encountered while processing:
     gcc
     g++
     build-essential
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    thanks!

  4. #4
    Join Date
    May 2010
    Location
    Tewkesbury uk
    Beans
    7,625
    Distro
    Ubuntu Development Release

    Re: Alternative Path Doesn't Exist Error

    Hi

    Try this from the terminal

    Code:
    sudo dpkg -P gcc
    Code:
    sudo apt-get clean
    Code:
    sudo apt-get -f install
    Post back any errors.

    Kind regards
    Join us on irc at #ubuntuforums. For web chat see here

    If you believe everything you read, you better not read. ~ Japanese Proverb

    Do not read newspapers on an empty stomach ~ Russian Proverb ~ BrunoLotse

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •