Ошибка Dpkg E: Подпроцесс / usr / bin / dpkg вернул код ошибки (2)

Я не могу обновить свою Ubuntu. 18.04. Вот журнал:

Fetched 427 MB in 45s (9,542 kB/s)                                             
Extracting templates from packages: 100%
Preconfiguring packages ...
dpkg: warning: 'start-stop-daemon' not found in PATH or not executable
dpkg: error: 1 expected program not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
E: Sub-process /usr/bin/dpkg returned an error code (2)

Я пробовал все решения, которые я нашел, но не нашел нужного.

echo $PATH
Output: /home/bs204/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/dart/bin

which start-stop-daemon
No output

Output cat /etc/sudoers

#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults    env_reset
Defaults    mail_badpass
Defaults    secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d
1
задан 23 July 2019 в 05:56

2 ответа

Я нашел решение своего вопроса.

sudo -i
mkdir /tmp
mkdir /tmp/dpkg
cd /tmp/dpkg
wget http://security.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.19.7ubuntu1_amd64.deb
ar -x dpkg_1.19.7ubuntu1_amd64.deb
tar -xf data.tar.xz
cp ./sbin/start-stop-daemon /sbin

Если поврежденный dpkg:

cp ./usr/bin/dpkg /usr/bin/
apt update 
apt install --reinstall dpkg
apt upgrade
3
ответ дан 3 December 2019 в 06:36

Спасибо, это помогает мне решить свою проблему:

  dpkg: warning:  'start-stop-daemon' not found in PATH or not executable

Одно дополнение к Вашему хорошему решению: В моей Системе OMV у меня нет "площади", таким образом, я использую команду

"dpkg-deb -x dpkg_1.19.7ubuntu1_amd64.deb ."
2
ответ дан 3 December 2019 в 06:36

Другие вопросы по тегам:

Похожие вопросы: