Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Cannot install build essentials in 12.04 LTS

  1. #1
    Join Date
    Dec 2012
    Beans
    12

    Cannot install build essentials in 12.04 LTS

    Okay, so I'm not sure if I should post this here or what.. I'm not terrible at the command line, basically everything I've done I've used it for. But for some reason I keep getting an error when I try and install Build Essentials, only reason I have a desire for it is because I need it to *make install* one of the applications. Here's what shows every attempt I've done.

    Code:
    Reading package lists... Done
    Building dependency tree        
    Reading state information... Done
    You might want to run 'apt-get -f install' to correct these:
    The following packages have unmet dependencies:
     build-essential : Depends: g++ (>= 4:4.4.3) but it is not going to be installed
                       Depends: dpkg-dev (>= 1.13.5) but it is not going to be installed
     grub-pc : Depends: grub2-common (= 1.99-21ubuntu3.5) but 1.99-21ubuntu3.6 is to be installed
               Depends: grub-pc-bin (= 1.99-21ubuntu3.5) but 1.99-21ubuntu3.6 is to be installed
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
    
    Then I try apt-get -f install and still here's what shows...
    
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Correcting dependencies... Done
    The following packages were automatically installed and are no longer required:
      gimp-help-en libbabl-0.0-0 libgegl-0.0-0 linux-headers-3.2.0-26
      gimp-help-common linux-headers-3.2.0-26-generic-pae libgimp2.0
      redeclipse-data libenet1a gimp-data
    Use 'apt-get autoremove' to remove them.
    The following extra packages will be installed:
      grub-pc
    The following packages will be upgraded:
      grub-pc
    1 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
    5 not fully installed or removed.
    Need to get 0 B/140 kB of archives.
    After this operation, 0 B of additional disk space will be used.
    Do you want to continue [Y/n]? y
    Setting up linux-image-3.2.0-34-generic-pae (3.2.0-34.53) ...
    Running depmod.
    update-initramfs: deferring update (hook will be called later)
    Examining /etc/kernel/postinst.d.
    run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-34-generic-pae /boot/vmlinuz-3.2.0-34-generic-pae
    update-initramfs: Generating /boot/initrd.img-3.2.0-34-generic-pae
    run-parts: executing /etc/kernel/postinst.d/pm-utils 3.2.0-34-generic-pae /boot/vmlinuz-3.2.0-34-generic-pae
    run-parts: executing /etc/kernel/postinst.d/update-notifier 3.2.0-34-generic-pae /boot/vmlinuz-3.2.0-34-generic-pae
    run-parts: executing /etc/kernel/postinst.d/zz-extlinux 3.2.0-34-generic-pae /boot/vmlinuz-3.2.0-34-generic-pae
    P: Checking for EXTLINUX directory... found.
    P: Writing config for /boot/vmlinuz-3.2.0-35-generic-pae...
    P: Writing config for /boot/vmlinuz-3.2.0-34-generic-pae...
    P: Writing config for /boot/vmlinuz-3.2.0-29-generic-pae...
    P: Writing config for /boot/vmlinuz-3.2.0-27-generic-pae...
    P: Writing config for /boot/vmlinuz-3.2.0-26-generic-pae...
    P: Writing config for /boot/vmlinuz-3.2.0-23-generic-pae...
    P: Installing debian theme... done.
    run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.2.0-34-generic-pae /boot/vmlinuz-3.2.0-34-generic-pae
    Generating grub.cfg ...
    Found linux image: /boot/vmlinuz-3.2.0-35-generic-pae
    Found initrd image: /boot/initrd.img-3.2.0-35-generic-pae
    Found linux image: /boot/vmlinuz-3.2.0-34-generic-pae
    Found initrd image: /boot/initrd.img-3.2.0-34-generic-pae
    Found linux image: /boot/vmlinuz-3.2.0-29-generic-pae
    Found initrd image: /boot/initrd.img-3.2.0-29-generic-pae
    Found linux image: /boot/vmlinuz-3.2.0-27-generic-pae
    Found initrd image: /boot/initrd.img-3.2.0-27-generic-pae
    Found linux image: /boot/vmlinuz-3.2.0-26-generic-pae
    Found initrd image: /boot/initrd.img-3.2.0-26-generic-pae
    Found linux image: /boot/vmlinuz-3.2.0-23-generic-pae
    Found initrd image: /boot/initrd.img-3.2.0-23-generic-pae
    Found memtest86+ image: /boot/memtest86+.bin
    Found Ubuntu 12.10 (12.10) on /dev/sda7
    Found Ubuntu 12.04.1 LTS (12.04) on /dev/sda8
    /etc/grub.d/40_custom: 1: /etc/grub.d/40_custom: menuentry: not found
    /etc/grub.d/40_custom: 2: /etc/grub.d/40_custom: Syntax error: "(" unexpected
    run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
    Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.2.0-34-generic-pae.postinst line 1010.
    dpkg: error processing linux-image-3.2.0-34-generic-pae (--configure):
     subprocess installed post-installation script returned error exit status 2
    Setting up linux-image-3.2.0-35-generic-pae (3.2.0-35.55) ...
    Running depmod.
    update-initramfs: deferring update (hook will be called later)
    Examining /etc/kernel/postinst.d.
    run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-35-generic-pae /boot/vmlinuz-3.2.0-35-generic-pae
    update-initramfs: Generating /boot/initrd.img-3.2.0-35-generic-pae
    run-parts: executing /etc/kernel/postinst.d/pm-utils 3.2.0-35-generic-pae /boot/vmlinuz-3.2.0-35-generic-pae
    run-parts: executing /etc/kernel/postinst.d/update-notifier 3.2.0-35-generic-pae /boot/vmlinuz-3.2.0-35-generic-pae
    run-parts: executing /etc/kernel/postinst.d/zz-extlinux 3.2.0-35-generic-pae /boot/vmlinuz-3.2.0-35-generic-pae
    P: Checking for EXTLINUX directory... found.
    P: Writing config for /boot/vmlinuz-3.2.0-35-generic-pae...
    P: Writing config for /boot/vmlinuz-3.2.0-34-generic-pae...
    P: Writing config for /boot/vmlinuz-3.2.0-29-generic-pae...
    P: Writing config for /boot/vmlinuz-3.2.0-27-generic-pae...
    P: Writing config for /boot/vmlinuz-3.2.0-26-generic-pae...
    P: Writing config for /boot/vmlinuz-3.2.0-23-generic-pae...
    P: Installing debian theme... done.
    run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.2.0-35-generic-pae /boot/vmlinuz-3.2.0-35-generic-pae
    Generating grub.cfg ...
    Found linux image: /boot/vmlinuz-3.2.0-35-generic-pae
    Found initrd image: /boot/initrd.img-3.2.0-35-generic-pae
    Found linux image: /boot/vmlinuz-3.2.0-34-generic-pae
    Found initrd image: /boot/initrd.img-3.2.0-34-generic-pae
    Found linux image: /boot/vmlinuz-3.2.0-29-generic-pae
    Found initrd image: /boot/initrd.img-3.2.0-29-generic-pae
    Found linux image: /boot/vmlinuz-3.2.0-27-generic-pae
    Found initrd image: /boot/initrd.img-3.2.0-27-generic-pae
    Found linux image: /boot/vmlinuz-3.2.0-26-generic-pae
    Found initrd image: /boot/initrd.img-3.2.0-26-generic-pae
    Found linux image: /boot/vmlinuz-3.2.0-23-generic-pae
    Found initrd image: /boot/initrd.img-3.2.0-23-generic-pae
    Found memtest86+ image: /boot/memtest86+.bin
    Found Ubuntu 12.10 (12.10) on /dev/sda7
    Found Ubuntu 12.04.1 LTS (12.04) on /dev/sda8
    /etc/grub.d/40_custom: 1: /etc/grub.d/40_custom: menuentry: not found
    /etc/grub.d/40_custom: 2: /etc/grub.d/40_custom: Syntax error: "(" unexpected
    run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
    Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.2.0-35-generic-pae.postinst line 1010.
    dpkg: error processing linux-image-3.2.0-35-generic-pae (--configure):
     subprocess installed post-installation script returned error exit status 2
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    Yeah it was a lot and I had my hopes up, but it failed and now I'm lost.. Because I tried to install build essentials again and got the same as before. I tried running 'sudo apt-get update' but it didn't help at all. Anyone have advise?
    Last edited by oldos2er; December 9th, 2012 at 09:36 PM. Reason: added code tags

  2. #2
    Join Date
    Jul 2007
    Location
    Magic City of the Plains
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Cannot install build essentials in 12.04 LTS

    Have you edited your /etc/grub.d/40_custom file?

  3. #3
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,560
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Cannot install build essentials in 12.04 LTS

    I don't know whether all this can be because of one simple syntax error, but did you notice it says you have syntax error in 40_custom?

    /etc/grub.d/40_custom: 1: /etc/grub.d/40_custom: menuentry: not found
    /etc/grub.d/40_custom: 2: /etc/grub.d/40_custom: Syntax error: "(" unexpected
    It seems you were trying to make manual entries in 40_custom but you have the syntax wrong. You can temporarily disable the file (so the syntax error won't count) to see if it continues. If it does, you can investigate the syntax error later. To temporarily disable 40_custom:
    Code:
    sudo chmod -x /etc/grub.d/40_custom
    After that try the sudo apt-get install -f again.
    See if the result is the same and whether the syntax error is reported again or not (I'm not sure if only disabling the file is enough or you actually have to fix the error first).
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

  4. #4
    Join Date
    Dec 2012
    Beans
    12

    Re: Cannot install build essentials in 12.04 LTS

    I did edit the 40_custom but it still works fine.. I'll temp. disable it and see what that does and hope it's works.. Thanks in advance for answering.

  5. #5
    Join Date
    Dec 2012
    Beans
    12

    Re: Cannot install build essentials in 12.04 LTS

    steven@LinuxLTS:~$ sudo chmod -x /etc/grub.d/40_custom
    [sudo] password for steven:
    steven@LinuxLTS:~$ sudo apt-get -f install
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Correcting dependencies... Done
    The following packages were automatically installed and are no longer required:
    gimp-help-en libbabl-0.0-0 libgegl-0.0-0 linux-headers-3.2.0-26 gimp-help-common
    linux-headers-3.2.0-26-generic-pae libgimp2.0 redeclipse-data libenet1a gimp-data
    Use 'apt-get autoremove' to remove them.
    The following extra packages will be installed:
    grub-pc
    The following packages will be upgraded:
    grub-pc
    1 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
    5 not fully installed or removed.
    Need to get 0 B/140 kB of archives.
    After this operation, 0 B of additional disk space will be used.
    Do you want to continue [Y/n]? y
    Setting up linux-image-3.2.0-34-generic-pae (3.2.0-34.53) ...
    Running depmod.
    update-initramfs: deferring update (hook will be called later)
    Examining /etc/kernel/postinst.d.
    run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-34-generic-pae /boot/vmlinuz-3.2.0-34-generic-pae
    update-initramfs: Generating /boot/initrd.img-3.2.0-34-generic-pae
    run-parts: executing /etc/kernel/postinst.d/pm-utils 3.2.0-34-generic-pae /boot/vmlinuz-3.2.0-34-generic-pae
    run-parts: executing /etc/kernel/postinst.d/update-notifier 3.2.0-34-generic-pae /boot/vmlinuz-3.2.0-34-generic-pae
    run-parts: executing /etc/kernel/postinst.d/zz-extlinux 3.2.0-34-generic-pae /boot/vmlinuz-3.2.0-34-generic-pae
    P: Checking for EXTLINUX directory... found.
    P: Writing config for /boot/vmlinuz-3.2.0-35-generic-pae...
    P: Writing config for /boot/vmlinuz-3.2.0-34-generic-pae...
    P: Writing config for /boot/vmlinuz-3.2.0-29-generic-pae...
    P: Writing config for /boot/vmlinuz-3.2.0-27-generic-pae...
    P: Writing config for /boot/vmlinuz-3.2.0-26-generic-pae...
    P: Writing config for /boot/vmlinuz-3.2.0-23-generic-pae...
    P: Installing debian theme... done.
    run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.2.0-34-generic-pae /boot/vmlinuz-3.2.0-34-generic-pae
    Generating grub.cfg ...
    Found linux image: /boot/vmlinuz-3.2.0-35-generic-pae
    Found initrd image: /boot/initrd.img-3.2.0-35-generic-pae
    Found linux image: /boot/vmlinuz-3.2.0-34-generic-pae
    Found initrd image: /boot/initrd.img-3.2.0-34-generic-pae
    Found linux image: /boot/vmlinuz-3.2.0-29-generic-pae
    Found initrd image: /boot/initrd.img-3.2.0-29-generic-pae
    Found linux image: /boot/vmlinuz-3.2.0-27-generic-pae
    Found initrd image: /boot/initrd.img-3.2.0-27-generic-pae
    Found linux image: /boot/vmlinuz-3.2.0-26-generic-pae
    Found initrd image: /boot/initrd.img-3.2.0-26-generic-pae
    Found linux image: /boot/vmlinuz-3.2.0-23-generic-pae
    Found initrd image: /boot/initrd.img-3.2.0-23-generic-pae
    Found memtest86+ image: /boot/memtest86+.bin
    Found Ubuntu 12.10 (12.10) on /dev/sda7
    Found Ubuntu 12.04.1 LTS (12.04) on /dev/sda8
    done
    Setting up linux-image-3.2.0-35-generic-pae (3.2.0-35.55) ...
    Running depmod.
    update-initramfs: deferring update (hook will be called later)
    Examining /etc/kernel/postinst.d.
    run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-35-generic-pae /boot/vmlinuz-3.2.0-35-generic-pae
    update-initramfs: Generating /boot/initrd.img-3.2.0-35-generic-pae
    run-parts: executing /etc/kernel/postinst.d/pm-utils 3.2.0-35-generic-pae /boot/vmlinuz-3.2.0-35-generic-pae
    run-parts: executing /etc/kernel/postinst.d/update-notifier 3.2.0-35-generic-pae /boot/vmlinuz-3.2.0-35-generic-pae
    run-parts: executing /etc/kernel/postinst.d/zz-extlinux 3.2.0-35-generic-pae /boot/vmlinuz-3.2.0-35-generic-pae
    P: Checking for EXTLINUX directory... found.
    P: Writing config for /boot/vmlinuz-3.2.0-35-generic-pae...
    P: Writing config for /boot/vmlinuz-3.2.0-34-generic-pae...
    P: Writing config for /boot/vmlinuz-3.2.0-29-generic-pae...
    P: Writing config for /boot/vmlinuz-3.2.0-27-generic-pae...
    P: Writing config for /boot/vmlinuz-3.2.0-26-generic-pae...
    P: Writing config for /boot/vmlinuz-3.2.0-23-generic-pae...
    P: Installing debian theme... done.
    run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.2.0-35-generic-pae /boot/vmlinuz-3.2.0-35-generic-pae
    Generating grub.cfg ...
    Found linux image: /boot/vmlinuz-3.2.0-35-generic-pae
    Found initrd image: /boot/initrd.img-3.2.0-35-generic-pae
    Found linux image: /boot/vmlinuz-3.2.0-34-generic-pae
    Found initrd image: /boot/initrd.img-3.2.0-34-generic-pae
    Found linux image: /boot/vmlinuz-3.2.0-29-generic-pae
    Found initrd image: /boot/initrd.img-3.2.0-29-generic-pae
    Found linux image: /boot/vmlinuz-3.2.0-27-generic-pae
    Found initrd image: /boot/initrd.img-3.2.0-27-generic-pae
    Found linux image: /boot/vmlinuz-3.2.0-26-generic-pae
    Found initrd image: /boot/initrd.img-3.2.0-26-generic-pae
    Found linux image: /boot/vmlinuz-3.2.0-23-generic-pae
    Found initrd image: /boot/initrd.img-3.2.0-23-generic-pae
    Found memtest86+ image: /boot/memtest86+.bin
    Found Ubuntu 12.10 (12.10) on /dev/sda7
    Found Ubuntu 12.04.1 LTS (12.04) on /dev/sda8
    done
    dpkg: dependency problems prevent configuration of grub-pc:
    grub-pc depends on grub2-common (= 1.99-21ubuntu3.5); however:
    Version of grub2-common on system is 1.99-21ubuntu3.6.
    grub-pc depends on grub-pc-bin (= 1.99-21ubuntu3.5); however:
    Version of grub-pc-bin on system is 1.99-21ubuntu3.6.
    dpkg: error processing grub-pc (--configure):
    dependency problems - leaving unconfigured
    Setting up linux-image-generic-pae (3.2.0.34.37) ...
    No apport report written because the error message indicates its a followup error from a previous failure.
    Setting up linux-generic-pae (3.2.0.34.37) ...
    Errors were encountered while processing:
    grub-pc
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    steven@LinuxLTS:~$ sudo apt-get install build-essential
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    You might want to run 'apt-get -f install' to correct these:
    The following packages have unmet dependencies:
    build-essential : Depends: g++ (>= 4:4.4.3) but it is not going to be installed
    Depends: dpkg-dev (>= 1.13.5) but it is not going to be installed
    grub-pc : Depends: grub2-common (= 1.99-21ubuntu3.5) but 1.99-21ubuntu3.6 is to be installed
    Depends: grub-pc-bin (= 1.99-21ubuntu3.5) but 1.99-21ubuntu3.6 is to be installed
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
    Didn't change anything, still failed to install build essentials... Though I have noticed this, again.

    E: Sub-process /usr/bin/dpkg returned an error code (1)

    Any idea what that is and if that has something to do with it?

  6. #6
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,560
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Cannot install build essentials in 12.04 LTS

    There is no syntax error reported now, so your 40_custom is definitely wrong.

    But it is still stuck at upgrading the package grub-pc, and until ti finishes that it will not be able to install other software. Unfortunately, I can't see why is it stuck at grub-pc.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

  7. #7
    Join Date
    Dec 2012
    Beans
    12

    Re: Cannot install build essentials in 12.04 LTS

    While looking through it I did notice something odd to me...

    dpkg: dependency problems prevent configuration of grub-pc:
    grub-pc depends on grub2-common (= 1.99-21ubuntu3.5); however:
    Version of grub2-common on system is 1.99-21ubuntu3.6.
    grub-pc depends on grub-pc-bin (= 1.99-21ubuntu3.5); however:
    Version of grub-pc-bin on system is 1.99-21ubuntu3.6.
    dpkg: error processing grub-pc (--configure):

    with that how it is, could I change the grub2common to 1.99-21ubuntu3.5?

  8. #8
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,560
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Cannot install build essentials in 12.04 LTS

    If grub-pc is holding it back, it should be fairly safe to completely remove it (purge) and reinstall it. But I can't say for 100% that it will resolve this. You might wanna wait for second opinion.

    To purge grub2 and reinstall it boot your ubuntu installation and do in terminal:
    Code:
    sudo apt-get remove --purge grub-pc grub-common
    sudo apt-get install grub-pc
    sudo grub-mkconfig
    sudo update-grub
    sudo grub-install /dev/sda (if you use grub on the MBR of /dev/sda)
    Since apt-get seems stuck, I don't know whether it will be able to remove and reinstall grub at all.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

  9. #9
    Join Date
    Dec 2012
    Beans
    12

    Re: Cannot install build essentials in 12.04 LTS

    Okay.. Well worse case scenario I have a backup on another drive.. I'll give this a try. One quick question, how do I get the 40_custom back for later reference?

  10. #10
    Join Date
    Dec 2012
    Beans
    12

    Re: Cannot install build essentials in 12.04 LTS

    Not even the first command worked... So I'm stuck without a clue to fix this

Page 1 of 2 12 LastLast

Tags for this Thread

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
  •