Debian installation error

Issue #665 resolved
Anonymous created an issue

When i try "sudo apt-get install scm-server" i become this error:

sudo apt-get install scm-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  scm-server
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/28.5 MB of archives.
After this operation, 29.1 MB of additional disk space will be used.
(Reading database ... 30970 files and directories currently installed.)
Unpacking scm-server (from .../scm-server_1.44_all.deb) ...
dpkg (subprocess): unable to execute new pre-installation script (/var/lib/dpkg/tmp.ci/preinst): Exec format error
dpkg: error processing /var/cache/apt/archives/scm-server_1.44_all.deb (--unpack):
 subprocess new pre-installation script returned error exit status 2
configured to not write apport reports
                                      Errors were encountered while processing:
 /var/cache/apt/archives/scm-server_1.44_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Comments (29)

  1. Sebastian Sdorra repo owner

    I've tested with debian wheezy and all works as expected. Could you try it again with a clean package list:

    rm /var/lib/apt/lists/* -vf
    apt-get clean
    apt-get update
    apt-get install scm-server
    
  2. Jonas
    2015-01-13 13:32:24 startup archives unpack
    2015-01-13 13:32:24 install scm-server <none> 1.44
    2015-01-13 13:32:24 status half-installed scm-server 1.44
    2015-01-13 13:32:24 status not-installed scm-server <none>
    
  3. Jonas

    First the status of the package:

    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
    +++-==============-==============-============================================
    in  scm-server     <none>         (no description available)
    

    I know about the workaround on this page, but i don´t know the folder/files where the permission issue is.

  4. Sebastian Sdorra repo owner

    Have you tried the workaround A?

    apt-get clean
    aptitude scm-server
    dpkg --unpack ./scm-server*.deb
    sudo dpkg --configure scm-server
    

    And workaround B?

    rm /var/lib/dpkg/info/scm-server.{postinst,prerm,postrm}
    apt-get remove --purge scm-server
    apt-get clean
    apt-get update
    apt-get install scm-server
    

    And both methods does not work? Could you post the output of workaround A?

  5. Jonas

    Both methods does not work :(

    Workaround A:

    root@kvmimageinstall:~# apt-get clean
    root@kvmimageinstall:~# aptitude scm-server
    Unknown command "scm-server"
    aptitude 0.6.3
    Usage: aptitude [-S fname] [-u|-i]
           aptitude [options] <action> ...
      Actions (if none is specified, aptitude will enter interactive mode):
    
     install      - Install/upgrade packages.
     remove       - Remove packages.
     purge        - Remove packages and their configuration files.
     hold         - Place packages on hold.
     unhold       - Cancel a hold command for a package.
     markauto     - Mark packages as having been automatically installed.
     unmarkauto   - Mark packages as having been manually installed.
     forbid-version - Forbid aptitude from upgrading to a specific package version.
     update       - Download lists of new/upgradable packages.
     safe-upgrade - Perform a safe upgrade.
     full-upgrade - Perform an upgrade, possibly installing and removing packages.
     build-dep    - Install the build-dependencies of packages.
     forget-new   - Forget what packages are "new".
     search       - Search for a package by name and/or expression.
     show         - Display detailed information about a package.
     clean        - Erase downloaded package files.
     autoclean    - Erase old downloaded package files.
     changelog    - View a package's changelog.
     download     - Download the .deb file for a package.
     reinstall    - Download and (possibly) reinstall a currently installed package.
     why          - Show the manually installed packages that require a package, or
                    why one or more packages would require the given package
     why-not      - Show the manually installed packages that lead to a conflict
                    with the given package, or why one or more packages would
                    lead to a conflict with the given package if installed.
    
      Options:
     -h             This help text.
     --no-gui       Do not use the GTK GUI even if available.
     -s             Simulate actions, but do not actually perform them.
     -d             Only download packages, do not install or remove anything.
     -P             Always prompt for confirmation or actions.
     -y             Assume that the answer to simple yes/no questions is 'yes'.
     -F format      Specify a format for displaying search results; see the manual.
     -O order       Specify how search results should be sorted; see the manual.
     -w width       Specify the display width for formatting search results.
     -f             Aggressively try to fix broken packages.
     -V             Show which versions of packages are to be installed.
     -D             Show the dependencies of automatically changed packages.
     -Z             Show the change in installed size of each package.
     -v             Display extra information. (may be supplied multiple times).
     -t [release]   Set the release from which packages should be installed.
     -q             In command-line mode, suppress the incremental progress.
                    indicators.
     -o key=val     Directly set the configuration option named 'key'.
     --with(out)-recommends Specify whether or not to treat recommends as.
                    strong dependencies.
     -S fname       Read the aptitude extended status info from fname.
     -u             Download new package lists on startup.
                      (terminal interface only) -i             Perform an install run on startup.
                      (terminal interface only)
                      This aptitude does not have Super Cow Powers.
    root@kvmimageinstall:~# dpkg --unpack ./scm-server*.deb
    dpkg: error processing ./scm-server*.deb (--unpack):
     cannot access archive: No such file or directory
    Errors were encountered while processing:
     ./scm-server*.deb
    root@kvmimageinstall:~# sudo dpkg --configure scm-server
    dpkg: error processing scm-server (--configure):
     no package named `scm-server' is installed, cannot configure
    Errors were encountered while processing:
     scm-server
    
  6. Sebastian Sdorra repo owner

    Sorry, there was an error in workaround a. Could you please try it again?

    apt-get clean
    aptitude download scm-server
    dpkg --unpack ./scm-server*.deb
    sudo dpkg --configure scm-server
    
  7. Jonas
    root@kvmimageinstall:~# apt-get clean
    root@kvmimageinstall:~# aptitude download scm-server
    Err http://maven.scm-manager.org/nexus/content/repositories/releases/ ./ scm-server 1.44
      The HTTP server sent an invalid Content-Range header
    root@kvmimageinstall:~# dpkg --unpack ./scm-server*.deb
    (Reading database ... 30972 files and directories currently installed.)
    Unpacking scm-server (from ./scm-server_1.44_all.deb) ...
    dpkg (subprocess): unable to execute new pre-installation script (/var/lib/dpkg/tmp.ci/preinst): Exec format error
    dpkg: error processing ./scm-server_1.44_all.deb (--unpack):
     subprocess new pre-installation script returned error exit status 2
    Errors were encountered while processing:
     ./scm-server_1.44_all.deb
    root@kvmimageinstall:~# sudo dpkg --configure scm-server
    dpkg: error processing scm-server (--configure):
     no package named `scm-server' is installed, cannot configure
    Errors were encountered while processing:
     scm-server
    
  8. Sebastian Sdorra repo owner

    Ok, the checksum is correct. Could you try to install the downloaded package?

    rm -f /var/lib/dpkg/info/scm-server.{postinst,prerm,postrm}
    apt-get remove --purge scm-server
    apt-get clean
    dpkg -i scm-server
    
  9. Jonas
    root@kvmimageinstall:/home# clear
    root@kvmimageinstall:/home# rm -f /var/lib/dpkg/info/scm-server.{postinst,prerm,postrm}
    root@kvmimageinstall:/home# apt-get remove --purge scm-server
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Package scm-server is not installed, so not removed
    0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
    root@kvmimageinstall:/home# apt-get clean
    root@kvmimageinstall:/home#
    root@kvmimageinstall:/home# dpkg -i scm-server
    dpkg: error processing scm-server (--install):
     cannot access archive: No such file or directory
    Errors were encountered while processing:
     scm-server
    root@kvmimageinstall:/home# dpkg -i scm-server-1.44-all.deb
    (Reading database ... 30972 files and directories currently installed.)
    Unpacking scm-server (from scm-server-1.44-all.deb) ...
    dpkg (subprocess): unable to execute new pre-installation script (/var/lib/dpkg/tmp.ci/preinst): Exec format error
    dpkg: error processing scm-server-1.44-all.deb (--install):
     subprocess new pre-installation script returned error exit status 2
    Errors were encountered while processing:
     scm-server-1.44-all.deb
    

    Is it possible that an subversion installation blocks the scm install?
    I´ve removed all previous installed subversion installations bevore scm.

  10. Stephan Christann

    Ok, since debian 7 has the dash as default shell, everything seems to be alright. What I read so far is, that some scripts like preinstall skripts are invoced by other shells that might be missing on your system. Please check, wether there is a /bin/bash available and executable on your system. What shell is fiven for your user in /etc/passwd - this is nice to know because you said, that a test of the script worked with your user what might be caused because of having a different shell for your user configured.

  11. Jonas

    I think it works ;)
    But when i try x.x.x.x:8080: nothing found.

    dpkg -i scm-server-2015012001.deb
    (Reading database ... 31005 files and directories currently installed.)
    Preparing to replace scm-server 1.44 (using scm-server-2015012001.deb) ...
    Unpacking replacement scm-server ...
    Setting up scm-server (1.44) ...
    
    apt-get install scm-server
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    scm-server is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
    
  12. Log in to comment