E: Sub-process /usr/bin/dpkg returned an error code (127)
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
E: Sub-process /usr/bin/dpkg returned an error code (127)
Hi to you all.
I have this problem with apt-get upgrade, this is what i get after the apt-get upgrade command.
apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
apache2 apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common apt apt-utils aptitude aptitude-common base-passwd bsdutils build-essential cpp cron curl dbus dpkg
eatmydata fontconfig-config g++ gcc initscripts iproute iptables iputils-ping isc-dhcp-client isc-dhcp-common krb5-multidev libapache2-mod-geoip libapache2-mod-perl2
libapache2-mod-php5 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libapt-pkg-perl libapt-pkg4.12 libauthen-pam-perl libblas3 libcurl3 libcurl3-gnutls
libcurl4-openssl-dev libcwidget3 libdbd-mysql-perl libdbi-perl libept1.4.12 libfile-fcntllock-perl libfile-fnmatch-perl libfontconfig1 libgcc1 libgcrypt11 libgcrypt11-dev
libgfortran3 libglib2.0-0 libgnutls-dev libgnutls-openssl27 libgnutls26 libgnutlsxx27 libgomp1 libgssapi-krb5-2 libgssrpc4 libhtml-parser-perl libhttp-message-perl
libio-pty-perl libio-socket-ssl-perl libjasper1 libk5crypto3 libkadm5clnt-mit8 libkadm5srv-mit8 libkrb5-3 libkrb5-dev libkrb5support0 libldap-2.4-2 libldap2-dev
liblocale-gettext-perl liblwp-protocol-https-perl libmailutils4 libnet-dns-perl libnet-http-perl libnet-ssleay-perl libnetaddr-ip-perl libp11-kit-dev libp11-kit0
libpam-modules libpam-modules-bin libpam0g libpython2.7 librtmp-dev libsasl2-2 libsemanage-common libsemanage1 libsocket6-perl libssh2-1 libssh2-1-dev libssh2-php libstdc++6
libtext-charwidth-perl libtext-iconv-perl libusb-1.0-0 libusb-1.0-0-dev libwww-perl libxapian22 login mailutils mailutils-common mc mc-data mount nmap openssh-client
openssh-server passwd perl perl-base perl-modules php-pear php5 php5-cli php5-common php5-curl php5-gd php5-imagick php5-mcrypt php5-mysql phpmyadmin postfix procps
proftpd-basic python python-minimal python2.7 python2.7-minimal rsyslog spamassassin squidguard ssh sudo sysv-rc sysvinit sysvinit-utils ttf-dejavu-core udev util-linux wget
The following packages will be upgraded:
apt-show-versions awstats base-files bash binutils bsdmainutils bzip2 ca-certificates comerr-dev coreutils cpio dash dbconfig-common debconf debconf-i18n
debian-archive-keyring debianutils deborphan debsums dialog diffutils dpkg-dev e2fslibs e2fsprogs ethtool findutils geoip-database gettext-base git git-core git-man gnupg
gpgv grep groff-base guile-1.8-libs gzip hostname ifupdown imagemagick-common info install-info kmod krb5-locales less libacl1 libaio1 libapr1 libapt-inst1.5 libasprintf0c2
libattr1 libblas3gf libblkid1 libbsd0 libbz2-1.0 libc-bin libc-dev-bin libc6 libc6-dev libcap2 libclass-isa-perl libcomerr2 libdbus-1-3 libdevel-symdump-perl libdpkg-perl
libedit2 liberror-perl libexpat1 libfreetype6 libfribidi0 libgd2-xpm libgdbm3 libgeoip1 libgmp10 libgpg-error-dev libgpg-error0 libgpm2 libgsasl7 libhtml-tree-perl
libhttp-cookies-perl libice6 libidn11 libidn11-dev libjbig0 libkdb5-6 libkeyutils1 libkmod2 liblcms2-2 liblinear1 liblqr-1-0 libltdl7 liblua5.1-0 liblzma5 libmagic1
libmcrypt4 libmount1 libmpfr4 libmysqlclient18 libncurses5 libncursesw5 libnet-ip-perl libnewt0.52 libnfnetlink0 libnl-3-200 libnl-genl-3-200 libntlm0 libonig2 libopts25
libpam-runtime libpcap0.8 libpcre3 libpcsclite1 libpipeline1 libpng12-0 libpopt0 libqdbm14 libreadline5 libreadline6 libsasl2-modules libselinux1 libsepol1
libsigc++-2.0-0c2a libslang2 libsm6 libsqlite3-0 libss2 libssl-dev libssl1.0.0 libswitch-perl libsys-hostname-long-perl libsystemd-login0 libtasn1-3 libtasn1-3-dev
libtimedate-perl libtinfo5 liburi-perl libusb-0.1-4 libustr-1.0-1 libuuid1 libwrap0 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxml2 libxmuu1 libxpm4 libxt6
linux-libc-dev locales locate logrotate lsb-base lua-expat lua-filesystem lua5.1 make man-db manpages mime-support multiarch-support mysql-client-5.5 mysql-common
mysql-server mysql-server-5.5 mysql-server-core-5.5 nano ncompress ncurses-base ncurses-bin ncurses-term net-tools netbase netcat-traditional ntp openssl patch pkg-config
popa3d procmail prosody psmisc readline-common rsync screen sed sensible-utils squid squid-common squid-langpack ssl-cert tar tasksel tasksel-data tcpd traceroute tzdata ucf
unzip usbutils whiptail wpasupplicant x11-common xauth xz-utils zlib1g zlib1g-dev
209 upgraded, 0 newly installed, 0 to remove and 143 not upgraded.
Need to get 0 B/71.3 MB of archives.
After this operation, 21.9 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Extracting templates from packages: 100%
Preconfiguring packages ...
/usr/bin/dpkg: 1: /usr/bin/dpkg: ▒▒▒▒▒▒▒▒▒▒
▒: File name too long
E: Sub-process /usr/bin/dpkg returned an error code (127)
I tryed autoremove, autoclean, clean, check (no errors).
Any one some idea how to solve this?
Thanks.
Your sources.list contains repositories on different versions, which may be the cause of the problem.
Current stable is now jessie (version 8) although wheezy (version 7) is used for "updates" repositories.
Check if there is a file containing "wheezy" in /etc/apt/sources.list.d/.
Code:
grep wheezy /etc/apt/sources.list.d/*
You may be able to fix the problem by replacing all "wheezy" and "stable" with "jessie" and upgrading.
You may try the following with root privilege at your own risk:
Code:
cp -a /etc/apt/sources.list /etc/apt/sources.list.backup.1 # to back up current sources.list
sed -i -e "s/stable/jessie/g" -e "s/wheezy/jessie/g" /etc/apt/sources.list # replace in /etc/apt/sources.list
apt-get clean
apt-get update
apt-get dist-upgrade -f
apt-get autoremove
dpkg --configure -a
Yes did
cp -a /etc/apt/sources.list /etc/apt/sources.list.backup.1 # to back up current sources.list
sed -i -e "s/stable/jessie/g" -e "s/wheezy/jessie/g" /etc/apt/sources.list # replace in /etc/apt/sources.list
apt-get clean
apt-get update
apt-get dist-upgrade -f After this i get the error.
Yes i did Eddy, but i think it is a dpkg error, when i try to use the dpkg command it says a lot of
"377\377\377\377\377\377\377\377\377\377" ending with ": command not found", that's weird right?
It is here, this is a small part of my locate, locate dpkg --limit=50
/etc/cron.daily/dpkg
/etc/default/rcS.dpkg-old
/etc/dpkg
/etc/dpkg/dpkg.cfg
/etc/dpkg/dpkg.cfg.d
/etc/dpkg/origins
/etc/dpkg/origins/debian
/etc/dpkg/origins/default
/etc/dpkg/shlibs.default
/etc/dpkg/shlibs.override
/etc/logrotate.d/dpkg
/etc/prosody/prosody.cfg.lua.dpkg-old
/usr/bin/dpkg
/usr/bin/dpkg-architecture
/usr/bin/dpkg-buildflags
/usr/bin/dpkg-buildpackage
/usr/bin/dpkg-checkbuilddeps
/usr/bin/dpkg-deb
/usr/bin/dpkg-distaddfile
/usr/bin/dpkg-divert
/usr/bin/dpkg-genchanges
/usr/bin/dpkg-gencontrol
/usr/bin/dpkg-gensymbols
/usr/bin/dpkg-maintscript-helper
/usr/bin/dpkg-mergechangelogs
/usr/bin/dpkg-name
/usr/bin/dpkg-parsechangelog
/usr/bin/dpkg-query
/usr/bin/dpkg-scanpackages
/usr/bin/dpkg-scansources
/usr/bin/dpkg-shlibdeps
/usr/bin/dpkg-source
/usr/bin/dpkg-split
/usr/bin/dpkg-statoverride
/usr/bin/dpkg-trigger
/usr/bin/dpkg-vendor
/usr/lib/dpkg
/usr/lib/dpkg/methods
/usr/lib/dpkg/methods/apt
/usr/lib/dpkg/methods/apt/desc.apt
/usr/lib/dpkg/methods/apt/install
/usr/lib/dpkg/methods/apt/names
/usr/lib/dpkg/methods/apt/setup
/usr/lib/dpkg/methods/apt/update
/usr/lib/dpkg/parsechangelog
/usr/lib/dpkg/parsechangelog/debian
/usr/lib/mc/extfs.d/dpkg+
Preconfiguring packages ...
/usr/bin/dpkg: 1: /usr/bin/dpkg: ▒▒▒▒▒▒▒▒▒▒
▒: File name too long
E: Sub-process /usr/bin/dpkg returned an error code (127)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.