Results 1 to 9 of 9

Thread: chroot: failed to run command `/usr/bin/env': Exec format error

  1. #1
    Join Date
    2013-Mar
    Posts
    3

    Exclamation chroot: failed to run command `/usr/bin/env': Exec format error

    Hi,

    I getting this error after "lb build" --> chroot: failed to run command `/usr/bin/env': Exec format error
    what could have possibly gone wrong?


    Code:
    chroot: failed to run command `/usr/bin/env': Exec format error[2013-03-24 19:27:33] lb build noauto
    [2013-03-24 19:27:33] lb bootstrap 
    P: Setting up cleanup function
    [2013-03-24 19:27:33] lb bootstrap_cache restore
    P: Restoring bootstrap stage from cache...
    [2013-03-24 19:27:33] lb bootstrap_cdebootstrap 
    P: Begin bootstrapping system...
    [2013-03-24 19:27:33] lb testroot 
    P: If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy.
    P: Running cdebootstrap (download-only)... 
    P: Retrieving InRelease
    P: Validating InRelease
    I: Good signature from "Kali Linux Repository <[email protected]>"
    P: Parsing InRelease
    P: Validating Packages.gz
    P: Parsing Packages
    P: Validating libc-bin
    P: Validating gcc-4.7-base
    ....
    "it goes on validating and extracting packages"
    ....
    P: Extracting hostname
    P: Extracting login
    P: Extracting ncurses-base
    P: Extracting ncurses-bin
    P: Extracting sed
    P: Extracting sysvinit
    P: Extracting xz-utils
    E: Execution failed: Exec format error
    E: Internal error: install
    P: Begin unmounting filesystems...
    P: Saving caches...
    chroot: failed to run command `/usr/bin/env': Exec format error

  2. #2
    Join Date
    2013-May
    Posts
    5
    Hey HollowMan,

    Did you get any update on this?

  3. #3
    Join Date
    2013-Mar
    Posts
    3
    unfortunately no :\ I still can't build my custom image...

  4. #4
    Join Date
    2013-Apr
    Posts
    126
    Can you give us more details about your environment ? the architecture your are trying to build ? the steps you did before "lb build" ?

  5. #5
    Join Date
    2013-May
    Posts
    5
    Hi root-boy,

    In my case none of the amd64 isos would work, unless I have to disable the pentest tools, so I had to download the vm image and install it.
    Install went fine, and VM start just fine. (took a snapshot)
    Update the VM downloaed about 900mb of updates.. (weired). (took a snapshot)

    Prepare for the iso build:

    apt-get install git live-build cdebootstrap kali-archive-keyring
    then clone the git :
    git clone git://git.kali.org/live-build-config.git
    goto the build dir :
    cd live[TAB]
    make the changes in the --> config/package-lists/kali.list.chroot comment all the Gnome desktop lines, and add the one I wanted for instance mc.
    nano -w config/package-lists/kali.list.chroot
    and since the image is an x86_32 arch, I did this step after the kali.list.chroot edit in case it reads the changes done to the said file:
    dpkg --add-architecture amd64
    apt-get update
    and then set the lb config to an x86_64 arch, this way:
    ln -sf wheezy /usr/share/live/build/data/debian-cd/kali
    lb config --architecture amd64
    and then build the iso:
    lb build.
    Last edited by uofis; 2013-05-21 at 15:55. Reason: ortho mistakes,and install operand after the apt-get...shame...

  6. #6
    Join Date
    2013-May
    Posts
    5
    results:
    Code:
    root@kali:~# apt-get git live-build cdebootstrap kali-archive-keyring
    E: Invalid operation git
    root@kali:~# apt-get install git live-build cdebootstrap kali-archive-keyring
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    git is already the newest version.
    kali-archive-keyring is already the newest version.
    The following packages were automatically installed and are no longer required:
      armitage enum4linux greenbone-security-assistant libblas3gf libksba8
      liblapack3gf libmicrohttpd10 libopenvas6 nasm openvas-administrator
      openvas-cli openvas-manager openvas-scanner polenum xsltproc
    Use 'apt-get autoremove' to remove them.
    The following extra packages will be installed:
      gnu-fdisk libdebian-installer-extra4 libdebian-installer4 live-boot-doc
      live-config-doc live-manual-html
    Suggested packages:
      debian-keyring xorriso loadlin memtest86+ memtest86 mtools squashfs-tools
      mtd-tools syslinux grub win32-loader
    The following NEW packages will be installed:
      cdebootstrap gnu-fdisk libdebian-installer-extra4 libdebian-installer4
      live-boot-doc live-build live-config-doc live-manual-html
    0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
    Need to get 854 kB of archives.
    After this operation, 7,386 kB of additional disk space will be used.
    Do you want to continue [Y/n]? y
    Get:1 http://http.kali.org/kali/ kali/main libdebian-installer4 i386 0.87 [33.3 kB]
    Get:2 http://http.kali.org/kali/ kali/main libdebian-installer-extra4 i386 0.87 [15.0 kB]
    Get:3 http://http.kali.org/kali/ kali/main cdebootstrap i386 0.5.10 [33.2 kB]
    Get:4 http://http.kali.org/kali/ kali/main live-boot-doc all 3.0~b11-1 [51.6 kB]
    Get:5 http://http.kali.org/kali/ kali/main live-build all 3.0.1-1+kali1 [180 kB]
    Get:6 http://http.kali.org/kali/ kali/main live-config-doc all 3.0.18-1 [49.9 kB]
    Get:7 http://http.kali.org/kali/ kali/main live-manual-html all 1:3.0.2-1 [373 kB]
    Get:8 http://http.kali.org/kali/ kali/main gnu-fdisk i386 1.2.4-3.1 [118 kB]
    Fetched 854 kB in 4s (183 kB/s)
    Selecting previously unselected package libdebian-installer4.
    (Reading database ... 239120 files and directories currently installed.)
    Unpacking libdebian-installer4 (from .../libdebian-installer4_0.87_i386.deb) ...
    Selecting previously unselected package libdebian-installer-extra4.
    Unpacking libdebian-installer-extra4 (from .../libdebian-installer-extra4_0.87_i386.deb) ...
    Selecting previously unselected package cdebootstrap.
    Unpacking cdebootstrap (from .../cdebootstrap_0.5.10_i386.deb) ...
    Selecting previously unselected package live-boot-doc.
    Unpacking live-boot-doc (from .../live-boot-doc_3.0~b11-1_all.deb) ...
    Selecting previously unselected package live-build.
    Unpacking live-build (from .../live-build_3.0.1-1+kali1_all.deb) ...
    Selecting previously unselected package live-config-doc.
    Unpacking live-config-doc (from .../live-config-doc_3.0.18-1_all.deb) ...
    Selecting previously unselected package live-manual-html.
    Unpacking live-manual-html (from .../live-manual-html_1%3a3.0.2-1_all.deb) ...
    Selecting previously unselected package gnu-fdisk.
    Unpacking gnu-fdisk (from .../gnu-fdisk_1.2.4-3.1_i386.deb) ...
    Adding 'diversion of /usr/share/man/man8/cfdisk.8.gz to /usr/share/man/man8/cfdisk.distrib.8.gz by gnu-fdisk'
    Adding 'diversion of /usr/share/man/man8/fdisk.8.gz to /usr/share/man/man8/fdisk.distrib.8.gz by gnu-fdisk'
    Adding 'diversion of /sbin/fdisk to /sbin/fdisk.distrib by gnu-fdisk'
    Adding 'diversion of /sbin/cfdisk to /sbin/cfdisk.distrib by gnu-fdisk'
    Processing triggers for man-db ...
    Processing triggers for install-info ...
    Setting up libdebian-installer4 (0.87) ...
    Setting up libdebian-installer-extra4 (0.87) ...
    Setting up cdebootstrap (0.5.10) ...
    Setting up live-boot-doc (3.0~b11-1) ...
    Setting up live-build (3.0.1-1+kali1) ...
    Setting up live-config-doc (3.0.18-1) ...
    Setting up live-manual-html (1:3.0.2-1) ...
    Setting up gnu-fdisk (1.2.4-3.1) ...
    root@kali:~# git clone git://git.kali.org/live-build-config.git
    Cloning into 'live-build-config'...
    remote: Counting objects: 505, done.
    remote: Compressing objects: 100% (254/254), done.
    remote: Total 505 (delta 257), reused 429 (delta 220)
    Receiving objects: 100% (505/505), 254.13 KiB | 231 KiB/s, done.
    Resolving deltas: 100% (257/257), done.
    root@kali:~# cd live-build-config/
    root@kali:~/live-build-config# nano -w config/package-lists/kali.list.chroot 
    root@kali:~/live-build-config# dpkg --add-architecture amd64
    root@kali:~/live-build-config# apt-get update
    Get:1 http://security.kali.org kali/updates Release.gpg [836 B]
    
    ### goes the list hit and get ###
                 
    Hit http://http.kali.org kali/contrib i386 Packages                            
    Fetched 24.7 MB in 52s (472 kB/s)                                              
    Reading package lists... Done
    root@kali:~/live-build-config# lb config --architecture amd64
    [2013-05-17 13:58:51] lb config --architecture amd64
    P: Executing auto/config script.
    ERROR: Run this first
    ln -sf wheezy /usr/share/live/build/data/debian-cd/kali
    root@kali:~/live-build-config# ln -sf wheezy /usr/share/live/build/data/debian-cd/kali
    root@kali:~/live-build-config# lb config --architecture amd64[2013-05-17 13:59:30] lb config --architecture amd64
    P: Executing auto/config script.
    [2013-05-17 13:59:30] lb config noauto --distribution kali --debian-installer-distribution kali --archive-areas main contrib non-free --bootstrap cdebootstrap --cdebootstrap-options --keyring=/usr/share/keyrings/kali-archive-keyring.gpg --suite-config=wheezy --keyring-packages kali-archive-keyring --updates false --backports false --source false --firmware-binary true --firmware-chroot true --mirror-bootstrap http://archive.kali.org/kali --mirror-debian-installer http://archive.kali.org/kali --mirror-chroot-security http://archive.kali.org/kali-security --mirror-binary http://http.kali.org/kali --mirror-binary-security http://security.kali.org/kali-security --iso-application Kali Linux --iso-publisher Kali --iso-volume Kali Live --linux-packages linux-image --bootappend-live boot=live noconfig=sudo username=root hostname=kali --debian-installer live --architecture amd64
    P: Considering defaults defined in /etc/live/build.conf
    P: Updating config tree for a debian/amd64 system
    root@kali:~/live-build-config# lb build
    [2013-05-17 13:59:59] lb build 
    P: Executing auto/build script.
    [2013-05-17 13:59:59] lb build noauto
    [2013-05-17 13:59:59] lb bootstrap 
    P: Setting up cleanup function
    [2013-05-17 13:59:59] lb bootstrap_cache restore
    P: Restoring bootstrap stage from cache...
    [2013-05-17 13:59:59] lb bootstrap_cdebootstrap 
    P: Begin bootstrapping system...
    [2013-05-17 13:59:59] lb testroot 
    P: If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy.
    P: Running cdebootstrap (download-only)... 
    P: Retrieving Release
    P: Retrieving Release.gpg
    P: Validating Release
    I: Good signature from "Kali Linux Repository <[email protected]>"
    P: Parsing Release
    P: Retrieving Packages.gz
    P: Validating Packages.gz
    P: Parsing Packages
    P: Retrieving libc-bin
    P: Validating libc-bin
    P: Retrieving gcc-4.7-base
    P: Validating gcc-4.7-base
    
    ### goes Retrieving /Validating ###
    
    P: Retrieving xz-utils
    P: Validating xz-utils
    P: If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy.
    P: Running cdebootstrap... 
    P: Retrieving Release
    P: Retrieving Release.gpg
    P: Validating Release
    I: Good signature from "Kali Linux Repository <[email protected]>"
    P: Parsing Release
    P: Validating Packages.gz
    P: Parsing Packages
    P: Validating libc-bin
    
    ### goes validating ###
    
    P: Validating xz-utils
    P: Extracting libc-bin
    
    ### goes extracting ###
    
    P: Extracting sysvinit
    P: Extracting xz-utils
    E: Execution failed: Exec format error
    E: Internal error: install
    P: Begin unmounting filesystems...
    P: Saving caches...
    chroot: failed to run command `/usr/bin/env': Exec format error
    root@kali:~/live-build-config#
    ### goes ### were shortened if full log is needed it can be provided.

    cheers,

  7. #7
    Join Date
    2013-Mar
    Posts
    3
    Hello root-boy, I have a 32bit architecture desktop with kali 1.0 gnome version installed, but I wanted to build a KDE 64bit image for my laptop, and so I went like this:

    apt-get install git live-build cdebootstrap kali-archive-keyring
    git clone git://git.kali.org/live-build-config.git
    cd live-build-config
    the I edited properly(at leat I think I did) config/package-lists/kali.list.chroot
    dpkg --add-architecture amd64
    apt-get update
    lb config --architecture amd64
    lb build
    ---//-----

    and then I got that error :\

  8. #8
    Join Date
    2013-Apr
    Posts
    126
    OK, i think you are getting this error because you're trying to build a 64bit ISO on a 32bit architecture. try to do it on kali 64bit and give me the results.

  9. #9
    Join Date
    2013-Jun
    Location
    I'm everywhere you want to be - but I prefer to drink all the booze and hack all the things. (>_>)
    Posts
    6
    Hi Hollow Man,

    I had the same problem - so I did the following:

    > echo deb http://repo.kali.org/kali kali-bleeding-edge main >> /etc/apt-sources.list
    > apt-get update --fix-missing
    > apt-get upgrade
    > apt-get dist-upgrade
    > cd live-build-config
    > lb clean
    > lb config --architecture i386
    > lb build

    After that, this old little lady of a single-core i386 laptop built my LXDE build. Here's what I built it on:
    > uname -a
    Linux Onyx 3.7-trunk-686-pae #1 SMP Debian 3.7.2-0+kali8 i686 GNU/Linux

    I hope this helps. Cheers!

Similar Threads

  1. date date format in command history
    By Capitob in forum TroubleShooting Archive
    Replies: 1
    Last Post: 2023-04-04, 23:53
  2. Replies: 2
    Last Post: 2018-05-08, 18:50
  3. Nexus 5 error when installing to chroot.
    By @nonymous in forum NetHunter General Questions
    Replies: 1
    Last Post: 2016-07-30, 17:13

Posting Permissions

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