Ошибка при обновлении apt - dpkg: error: need an action option

Ошибка при обновлении apt - dpkg: error: need an action option
Ошибка при обновлении apt - dpkg: error: need an action option - shuttergenic @ Unsplash

Я пытаюсь обновить свою машину с помощью 'apt update', затем 'apt upgrade', я получаю ошибку при обновлении dash до последней версии.

Preparing to unpack .../dash_0.5.11+git20210120+802ebd4-2_amd64.deb ...
dpkg: error: need an action option

Type dpkg --help for help about installing and deinstalling packages [*];
Use 'apt' or 'aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;

Options marked [*] produce a lot of output - pipe it through 'less' or 'more' !
dpkg: warning: old dash package pre-removal script subprocess returned error exit status 2
dpkg: trying script from the new package instead ...
dpkg: error: need an action option

Type dpkg --help for help about installing and deinstalling packages [*];
Use 'apt' or 'aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;

Options marked [*] produce a lot of output - pipe it through 'less' or 'more' !
dpkg: error processing archive /var/cache/apt/archives/dash_0.5.11+git20210120+8
02ebd4-2_amd64.deb (--unpack):
 new dash package pre-removal script subprocess returned error exit status 2
dpkg: error: need an action option

Type dpkg --help for help about installing and deinstalling packages [*];
Use 'apt' or 'aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;

Options marked [*] produce a lot of output - pipe it through 'less' or 'more' !
dpkg: error while cleaning up:
 installed dash package post-installation script subprocess returned error exit 
status 2
Errors were encountered while processing:
 /var/cache/apt/archives/dash_0.5.11+git20210120+802ebd4-2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Я попробовал apt purge dash, но та же ошибка.

Получил решение по следующей ссылке.

https://phoenixnap.com/kb/fix-sub-process-usr-bin-dpkg-returned-error-code-1

"Метод 5: Удаление пост-файлов" из ссылки сделал свое дело.

mv /var/lib/dpkg/info/dash.* /tmp

Это позволило обновить dash без ошибок.


NevaDev, 7 февраля 2023 г., 21:59