
but i m getting error dpkg: need an action option
root@bt:~# ls
Desktop google-chrome-stable_current_i386.deb
root@bt:~# dpkg .i google-chrome-stable_current_i386.deb
dpkg: need an action option
Type dpkg --help for help about installing and deinstalling packages [*];
Use `dselect' 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;
Type dpkg --license for copyright license and lack of warranty (GNU GPL) [*].
Options marked [*] produce a lot of output - pipe it through `less' or `more' !
root@bt:~# dpkg .i google-chrome-stable_current_i386.deb
dpkg: need an action option
Type dpkg --help for help about installing and deinstalling packages [*];
Use `dselect' 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;
Type dpkg --license for copyright license and lack of warranty (GNU GPL) [*].
Options marked [*] produce a lot of output - pipe it through `less' or `more' !
root@bt:~#
now this error
root@bt:~# dpkg -i google-chrome-stable_current_i386.deb
(Reading database ... 266492 files and directories currently installed.)
Preparing to replace google-chrome-stable 33.0.1750.152-1 (using google-chrome- stable_current_i386.deb) ...
Unpacking replacement google-chrome-stable ...
dpkg: dependency problems prevent configuration of google-chrome-stable:
google-chrome-stable depends on gconf-service; however:
Package gconf-service is not installed.
google-chrome-stable depends on libasound2 (>= 1.0.23); however:
Version of libasound2 on system is 1.0.22-0ubuntu7.
google-chrome-stable depends on libgconf-2-4 (>= 2.31.1); however:
Package libgconf-2-4 is not installed.
google-chrome-stable depends on libgcrypt11 (>= 1.4.5); however:
Version of libgcrypt11 on system is 1.4.4-5ubuntu2.1.
google-chrome-stable depends on libgdk-pixbuf2.0-0 (>= 2.22.0); however:
Package libgdk-pixbuf2.0-0 is not installed.
google-chrome-stable depends on libgtk2.0-0 (>= 2.24.0); however:
Version of libgtk2.0-0 on system is 2.20.1-0ubuntu2.1.
google-chrome-stable depends on libnspr4 (>= 1.8.0.10); however:
Package libnspr4 is not installed.
google-chrome-stable depends on libnss3 (>= 3.14.3); however:
Package libnss3 is not installed.
google-chrome-stable depends on libstdc++6 (>= 4.6); however:
Version of libstdc++6 on system is 4.4.3-4ubuntu5.1.
google-chrome-stable depends on libx11-6 (>= 2:1.4.99.1); however:
Version of libx11-6 on system is 2:1.3.2-1ubuntu3.
dpkg: error processing google-chrome-stable (--install):
dependency problems - leaving unconfigured
Processing triggers for desktop-file-utils ...
Processing triggers for python-gmenu ...
Rebuilding /usr/share/applications/desktop.en_US.utf8.cache...
Processing triggers for man-db ...
Processing triggers for menu ...
Processing triggers for python-support ...
Errors were encountered while processing:
google-chrome-stable
asked Mar 18, 2014 at 12:43
MaveňツMaveňツ
9,26714 gold badges55 silver badges95 bronze badges
This error can occur when copy/pasting the command from online instructions rather than typing it yourself. So instead of ‘-‘ you end up with ‘–’ and you get the error.
answered Mar 21, 2016 at 15:42
andydaviesandydavies
2,9413 gold badges30 silver badges35 bronze badges
0
Use following:
dpkg -i google-chrome-stable_current_i386.deb
Notice the «-» infront of the parameter i.
answered Mar 18, 2014 at 12:53
chameerachameera
3791 silver badge7 bronze badges
3
I had this error even using -i. Then I tried using —install and it worked.
sudo dpkg —install google-chrome-stable_current_i386.deb
answered Sep 15, 2014 at 6:46
Mukesh ChapagainMukesh Chapagain
24.6k15 gold badges115 silver badges119 bronze badges
please correct your command dpkg -i google-chrome-stable_current_i386.deb ,You need to provide -i instead of .i option
answered Mar 18, 2014 at 12:50
Rahul R DhobiRahul R Dhobi
5,5681 gold badge28 silver badges38 bronze badges
0
Today I had the same problem when following a tutorial on how to install chrome. The problem was that I was copying a different character set from the tutorial which caused confusion in the hyphen from the syntax.
answered Jan 4, 2016 at 13:30
anathanath
111 bronze badge
0
The problem stems different representation of characters when you «copy and paste». Copying and pasting will yield «xxx –i xxxx»… but what your terminal requires is «-i«. The first one is a longer ‘dash’ ie «–«, while the second (correct) one is a shorter dash ie «—«. This discrepancy causes the error. To avoid, just replace the dash aspect by typing directly from your keyboard. This worked for me.
answered Mar 16, 2019 at 0:31
re-dependency problem maybe it’s because of «gnupg is not installed».
answered May 23, 2022 at 7:13
I am trying to upgrade my machine with ‘apt update’ then ‘apt upgrade’, I am getting an error in upgrading dash to latest version
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)
I tried apt purge dash, but same error.
asked Oct 28, 2021 at 8:32
Got the solution from the following link-
https://phoenixnap.com/kb/fix-sub-process-usr-bin-dpkg-returned-error-code-1
«Method 5: Remove Post Files» from the link did the trick.
mv /var/lib/dpkg/info/dash.* /tmp
This allowed to fresh upgrade dash without errors.
answered Nov 13, 2021 at 19:21
DeshBhaktDeshBhakt
6773 gold badges8 silver badges14 bronze badges
Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.
-
juliohm
[SOLVED] Stuck, unable to upgrade packages — dpkg: error: need an action option
I haven’t been able to find any good hints about this on Google, so here it goes…
Recently did a fresh install of Linux Mint 18 Sarah on my PC and have been using it for about a week now. Added a few sources to /etc/apt/sources.list.d/ and it all seemed great until today.
checked for new updates…
Code: Select all
jhem@jhempc ~ $ apt update
Ign:1 http://mint-packages.c3sl.ufpr.br sarah InRelease
Hit:2 http://ubuntu.c3sl.ufpr.br/ubuntu xenial InRelease
Hit:3 http://mint-packages.c3sl.ufpr.br sarah Release
Hit:4 http://ubuntu.c3sl.ufpr.br/ubuntu xenial-updates InRelease
Hit:5 http://ubuntu.c3sl.ufpr.br/ubuntu xenial-backports InRelease
Get:7 http://security.ubuntu.com/ubuntu xenial-security InRelease [94,5 kB]
Hit:8 http://ppa.launchpad.net/gencfsm/ppa/ubuntu xenial InRelease
Hit:9 http://apt.syncthing.net syncthing InRelease
Hit:10 http://archive.canonical.com/ubuntu xenial InRelease
Hit:11 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
Fetched 94,5 kB in 0s (129 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
4 packages can be upgraded. Run 'apt list --upgradable' to see them.
tried upgrading…
Code: Select all
jhem@jhempc ~ $ apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
mintupload nvidia-prime-applet openssh-client ssh-askpass-gnome
4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/673 kB of archives.
After this operation, 1.024 B disk space will be freed.
Do you want to continue? [Y/n] Y
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' !
E: Sub-process /usr/bin/dpkg returned an error code (2)
also tried sudo apt-get upgrade, but with the same result.
Code: Select all
jhem@jhempc ~ $ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
mintupload nvidia-prime-applet openssh-client ssh-askpass-gnome
4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/673 kB of archives.
After this operation, 1.024 B disk space will be freed.
Do you want to continue? [Y/n] Y
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' !
E: Sub-process /usr/bin/dpkg returned an error code (2)
I have no idea what this error message means, and I can’t install or upgrade any packages. Can anyone give me any hints?
Kind regards.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
-
juliohm
Re: Stuck, unable to upgrade packages — dpkg: error: need an action option
Post
by juliohm » Tue Aug 16, 2016 4:26 pm
Thanks. But that seems to relate to a specific corrupted package.
In my case, no package name is given in the error message. The ones shown listed for upgrade were downloaded correctly. I was able to cd into /var/cache/apt/archives and install them manually using dpkg.
Code: Select all
jhem@jhempc /var/cache/apt $ cd /var/cache/apt/archives
jhem@jhempc /var/cache/apt/archives $ sudo dpkg -i mintupload_4.0.8_all.deb
(Reading database ... 238718 files and directories currently installed.)
Preparing to unpack mintupload_4.0.8_all.deb ...
Unpacking mintupload (4.0.8) over (4.0.7) ...
Setting up mintupload (4.0.8) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
Processing triggers for mime-support (3.59ubuntu1) ...
jhem@jhempc /var/cache/apt/archives $ sudo dpkg -i nvidia-prime-applet_1.0.5_all.deb
(Reading database ... 238718 files and directories currently installed.)
Preparing to unpack nvidia-prime-applet_1.0.5_all.deb ...
Unpacking nvidia-prime-applet (1.0.5) over (1.0.4) ...
Setting up nvidia-prime-applet (1.0.5) ...
jhem@jhempc /var/cache/apt/archives $ sudo dpkg -i openssh-client_1%3a7.2p2-4ubuntu2.1_amd64.deb
(Reading database ... 238718 files and directories currently installed.)
Preparing to unpack openssh-client_1%3a7.2p2-4ubuntu2.1_amd64.deb ...
Unpacking openssh-client (1:7.2p2-4ubuntu2.1) over (1:7.2p2-4ubuntu1) ...
Setting up openssh-client (1:7.2p2-4ubuntu2.1) ...
Processing triggers for man-db (2.7.5-1) ...
jhem@jhempc /var/cache/apt/archives $ sudo dpkg -i ssh-askpass-gnome_1%3a7.2p2-4ubuntu2.1_amd64.deb
(Reading database ... 238718 files and directories currently installed.)
Preparing to unpack ssh-askpass-gnome_1%3a7.2p2-4ubuntu2.1_amd64.deb ...
Unpacking ssh-askpass-gnome (1:7.2p2-4ubuntu2.1) over (1:7.2p2-4ubuntu1) ...
Setting up ssh-askpass-gnome (1:7.2p2-4ubuntu2.1) ...
Processing triggers for man-db (2.7.5-1) ...
But as soon as I try installing, reinstalling or removing anything via apt, the same error appears. For example, trying to install emacs:
Code: Select all
jhem@jhempc /var/cache/apt/archives $ apt install emacs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
emacs24 emacs24-bin-common emacs24-common emacs24-common-non-dfsg libm17n-0 libotf0 m17n-db
Suggested packages:
ncurses-term m17n-docs
Recommended packages:
emacs24-el
The following NEW packages will be installed:
emacs emacs24 emacs24-bin-common emacs24-common emacs24-common-non-dfsg libm17n-0 libotf0 m17n-db
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/22,2 MB of archives.
After this operation, 97,1 MB of additional disk space will be used.
Do you want to continue? [Y/n]
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' !
E: Sub-process /usr/bin/dpkg returned an error code (2)
… or trying to reinstall htop, which is already installed.
Code: Select all
jhem@jhempc /var/cache/apt/archives $ sudo apt-get install --reinstall htop
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 76,6 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ubuntu.c3sl.ufpr.br/ubuntu xenial/universe amd64 htop amd64 2.0.1-1 [76,6 kB]
Fetched 76,6 kB in 0s (4.389 kB/s)
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' !
E: Sub-process /usr/bin/dpkg returned an error code (2)
… or trying to remove it:
Code: Select all
jhem@jhempc /var/cache/apt/archives $ sudo apt-get remove htop
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
htop
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 215 kB disk space will be freed.
Do you want to continue? [Y/n]
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' !
E: Sub-process /usr/bin/dpkg returned an error code (2)
-
juliohm
Re: Stuck, unable to upgrade packages — dpkg: error: need an action option
Post
by juliohm » Tue Aug 16, 2016 5:10 pm
Yes!
This reddit thread provided a good hint.
Back when we had the PC reinstalled, some of us fancied with unattended upgrade files, specifically /etc/apt/apt.conf.d/50unattended-upgrades. Along with extra options for Allowed-Origins, someone slapped the following lines into this file:
Code: Select all
Dpkg::Options {
“–force-confnew”;
}
… hoping it would force dpkg to replace all configuration files (such as the ones in /etc) with whatever is provided in the upgraded package.
This broke dpkg at the command line system wide. After removing the -force-confnew option, everything is back to normal.
Thanks all for the help!
- Forum
- The Ubuntu Forum Community
- Ubuntu Official Flavours Support
- New to Ubuntu
- [SOLVED] Trying to install chrome and it says «dpkg: error: need an action option»
-
Trying to install chrome and it says «dpkg: error: need an action option»
I have no idea what I’m doing. I’m just following instructions from
http://howtogeek.com/203768/beginner…n-ubuntu-14.04
Thanks
-
Re: Trying to install chrome and it says «dpkg: error: need an action option»
Can you please copy/paste into the thread the exact command you used, using code tags for the effect.
-
Re: Trying to install chrome and it says «dpkg: error: need an action option»
sudo dpkg �I google-chrome-stable_current_amd64.deb
Not sure what you mean by code tags
Thanks
I just copied the command from the site and pasted it directly
Last edited by howefield; November 19th, 2016 at 10:54 PM.
Reason: posts combined.
-
Re: Trying to install chrome and it says «dpkg: error: need an action option»
Originally Posted by juntjoo2
sudo dpkg –I google-chrome-stable_current_amd64.deb
That’s your culprit right there. The command you copied from the website contains non-ASCII characters. That dash in front of the i is not a hyphen (or minus), but an en-dash. Try using
Code:
sudo dpkg -i google-chrome-stable_current_amd64.deb
Last edited by slickymaster; November 19th, 2016 at 09:30 PM.
-
Re: Trying to install chrome and it says «dpkg: error: need an action option»
Originally Posted by juntjoo2
—-
Not sure what you mean by code tags
Please, have a read at this post: https://ubuntuforums.org/showthread….1#post12776168
-
Re: Trying to install chrome and it says «dpkg: error: need an action option»
thanks a lot. it worked but then this. any idea what it means?
Code:
[sudo] password for ben: Selecting previously unselected package google-chrome-stable. (Reading database ... 173964 files and directories currently installed.) Preparing to unpack google-chrome-stable_current_amd64.deb ... Unpacking google-chrome-stable (54.0.2840.100-1) ... dpkg: dependency problems prevent configuration of google-chrome-stable: google-chrome-stable depends on libappindicator1; however: Package libappindicator1 is not installed. dpkg: error processing package google-chrome-stable (--install): dependency problems - leaving unconfigured Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ... Processing triggers for desktop-file-utils (0.22-1ubuntu5) ... Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160701-0ubuntu1) ... Rebuilding /usr/share/applications/bamf-2.index... Processing triggers for mime-support (3.59ubuntu1) ... Processing triggers for man-db (2.7.5-1) ... Errors were encountered while processing: google-chrome-stable
Last edited by slickymaster; November 19th, 2016 at 08:52 PM.
Reason: Added code tags
-
Re: Trying to install chrome and it says «dpkg: error: need an action option»
Please run in a terminal window
Code:
sudo apt-get install -f
This will install missing dependencies and configure Google Chrome.
-
Re: Trying to install chrome and it says «dpkg: error: need an action option»
Originally Posted by slickymaster
Please run in a terminal window
Code:
sudo apt-get install -f
This will install missing dependencies and configure Google Chrome.
thanks. I don’t know what happened but it looked better than last time.
…yup, it installed. Thank you!
-
Re: Trying to install chrome and it says «dpkg: error: need an action option»
Originally Posted by juntjoo2
thanks. I don’t know what happened but it looked better than last time.
…yup, it installed. Thank you!
Glad you got it working.
Now, please mark the thread as solved so other people searching the forums know that it provides a working solution for the problem.
Bookmarks
Bookmarks

Posting Permissions
Содержание
- Не работает dpkg.
- Linux Mint Forums
- [SOLVED] Stuck, unable to upgrade packages — dpkg: error: need an action option
- [SOLVED] Stuck, unable to upgrade packages — dpkg: error: need an action option
- Re: Stuck, unable to upgrade packages — dpkg: error: need an action option
- Re: Stuck, unable to upgrade packages — dpkg: error: need an action option
- Re: Stuck, unable to upgrade packages — dpkg: error: need an action option
- Debian User Forums
- Dpkg error can’t solve
- Dpkg error can’t solve
- Linux Mint Forums
- [Solved] Update error?
- [Solved] Update error?
- Re: Update error?
- Re: Update error?
- Re: Update error?
- Re: Update error?
- Re: Update error?
- Re: Update error?
- Re: Update error?
- Re: Update error?
- Re: Update error?
- Re: Update error?
- Linux Mint Forums
- Update not working (dpkg error)
- Update not working (dpkg error)
- Re: Update not working (dpkg error)
- Re: Update not working (dpkg error)
- Re: Update not working (dpkg error)
- Re: Update not working (dpkg error)
- Re: Update not working (dpkg error)
- Re: Update not working (dpkg error)
- Re: Update not working (dpkg error)
- Re: Update not working (dpkg error)
- Re: Update not working (dpkg error)
- Re: Update not working (dpkg error)
- Re: Update not working (dpkg error)
- Re: Update not working (dpkg error)
- Re: Update not working (dpkg error)
- Re: Update not working (dpkg error)
- Re: Update not working (dpkg error)
- Re: Update not working (dpkg error)
- Re: Update not working (dpkg error)
- Re: Update not working (dpkg error)
Не работает dpkg.
Доброе время суток. Недавно заметил что dpkg не рабоает, где-то накосячил.
Помогите пожалуйста нубу
Лолшто? Он работает, но команда, по всей видимости, написана криво.
поставить пакет: dpkg -i имя_файла
удалить пакет: dpkg -r имя_пакета
Раньше(недели 3 назад) я запускал dpkg nemo вводил пароль и открывался наутилус под рутом, сейчас же нифига!
может sudo nemo?
нет. Судо надо именно из терминала запускать и там пароль вводить. А дпкг я использовал как судо только при использовании run(alt+f2) вылазило окошко я вбивал пасс и все ок
!вылазило окошко я вбивал сначала dpkg . потом вновь вылазило окошко для пароля, вбивал пасс и все ок
Что у тебя за DE? Для кед нужно использовать kdesudo
я не знаю какая у него среда, вроде гном не кидайтесь тапками 😀
Тогда вроде gksudo
значит это выходит я 2 команды попутал.
Ты б хоть почитал, что вообще такое есть dpkg(8), а не разводил тут бред вроде этого:
Все правильно, че 🙂
И да, раз запутался в командах, читай сначала whatis(1), затем man(1). А тред создавать незачем. И да, циферки в скобках частями команд не являются, подробнее в man(1).
Источник
Linux Mint Forums
Welcome to the Linux Mint forums!
[SOLVED] Stuck, unable to upgrade packages — dpkg: error: need an action option
[SOLVED] Stuck, unable to upgrade packages — dpkg: error: need an action option
Post by juliohm » Tue Aug 16, 2016 3:57 pm
I haven’t been able to find any good hints about this on Google, so here it goes.
Recently did a fresh install of Linux Mint 18 Sarah on my PC and have been using it for about a week now. Added a few sources to /etc/apt/sources.list.d/ and it all seemed great until today.
checked for new updates.
I have no idea what this error message means, and I can’t install or upgrade any packages. Can anyone give me any hints?
Re: Stuck, unable to upgrade packages — dpkg: error: need an action option
Post by Ronnie01 » Tue Aug 16, 2016 4:04 pm
Re: Stuck, unable to upgrade packages — dpkg: error: need an action option
Post by juliohm » Tue Aug 16, 2016 4:26 pm
Thanks. But that seems to relate to a specific corrupted package.
In my case, no package name is given in the error message. The ones shown listed for upgrade were downloaded correctly. I was able to cd into /var/cache/apt/archives and install them manually using dpkg.
Re: Stuck, unable to upgrade packages — dpkg: error: need an action option
Post by juliohm » Tue Aug 16, 2016 5:10 pm
Back when we had the PC reinstalled, some of us fancied with unattended upgrade files, specifically /etc/apt/apt.conf.d/50unattended-upgrades. Along with extra options for Allowed-Origins, someone slapped the following lines into this file:
. hoping it would force dpkg to replace all configuration files (such as the ones in /etc) with whatever is provided in the upgraded package.
This broke dpkg at the command line system wide. After removing the -force-confnew option, everything is back to normal.
Источник
Debian User Forums
Dpkg error can’t solve
Dpkg error can’t solve
#1 Post by theblueplll » 2019-07-04 15:29
Machine is an older machine I was trying to setup for a project running Debian Buster 32bit
AMD Semperon 3000+ 1.5gb ram no desktop(don’t need one for what I want to do)
Seems to run great untill I try to install a package.
I don’t have anything from any repo besides Debians official repos on purpose.
I keep getting this when I try to install things.
Partitions are setup like this
Doesn’t seem to matter what it is although some packages will install without error.
Have tried the instructions at this link and a few similar things to no avail
I also can NOT remove the package once this happens when I try to I get unment dependency warnings.
And if I try to install the dependencies it starts with the dpkg errors all over again.
This started when I had Buster installed on it originally so I switched to Stretch thinking the older hardware would work better but had the same problem.
So i reinstalled Buster again and some stuff was whacky so I looked into it and found out either my iso was corrupted or my flash drive was acting funny.
So I tried with a new usb stick and a fresh download that I verified and check for integrity and it seemed to install a lot faster and smoother.
2 days go by and the problem comes back.
Could this be a hardware problem somehow? Maybe a bad hdd?
Both drives are kind of old.
Any other information that could be needed please just ask and I will do my best to share it.
Источник
Linux Mint Forums
Welcome to the Linux Mint forums!
[Solved] Update error?
[Solved] Update error?
Post by haystack » Mon Feb 03, 2020 7:42 pm
I’m running Mint 19.3, and I’ve got some updates that are waiting to be installed. I tried clicking on «Install Updates», but I got a window that said an error occurred with a dialogue box that says:
E: dpkg was interrupted, you must manually run ‘dpkg — configure -a’ to correct the problem.
E: _cache->open() failed, please report.
I’ve never come across this before and I have no idea what to do. Any help would be appreciated.
Re: Update error?
Post by MrEen » Mon Feb 03, 2020 7:48 pm
Open a terminal and plug this in then hit Enter:
Re: Update error?
Post by haystack » Mon Feb 03, 2020 8:25 pm
Okay, so I typed in ‘sudo dpkg — configure -a’, entered my password, and this is what it gave me:
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;
Re: Update error?
Post by karlchen » Mon Feb 03, 2020 8:32 pm
Re: Update error?
Post by MrEen » Mon Feb 03, 2020 8:38 pm
I thought that looked weird. I even did a quick search and saw it suggested in other threads.
My apologies, haystack.
Re: Update error?
Post by MrEen » Mon Feb 03, 2020 8:40 pm
I thought that looked weird. I even did a quick search and saw it suggested in other threads.
My apologies, haystack.
EDIT: When I searched earlier, my eyes must have been playing tricks on me. All references I find now are only the correct command.
Re: Update error?
Post by decrepit » Mon Feb 03, 2020 8:44 pm
Re: Update error?
Post by MrEen » Mon Feb 03, 2020 8:48 pm
Re: Update error?
Post by haystack » Mon Feb 03, 2020 9:27 pm
No worries guys. I entered the correct command and got it done. Or at least I believe so. I entered the first command, then my password, it appeared to work, so I then entered ‘apt update’, it then updated. I then got this:
’20 packages can be upgraded. Run ‘apt list —upgradable’ to see them.’
I entered ‘apt list —upgradable’, and it made a list.
I entered what I thought would update one of the things on the list, but I was wrong. It said I should try ‘sudo apt install tlp’, which I entered that command and it starting updating. I believe it updated something, but my question is, when I entered ‘sudo apt install tlp’, did that install all the updates on that list?
Re: Update error?
Post by MrEen » Mon Feb 03, 2020 9:34 pm
No. Which you can verify if you wish by running apt list —upgradable again.
You can just go back to using the Update Manager to update things now so you don’t have to do everything individually. Hit Refresh first when it opens so everything upgradable will be there.
Re: Update error?
Post by haystack » Mon Feb 03, 2020 9:44 pm
Источник
Linux Mint Forums
Welcome to the Linux Mint forums!
Update not working (dpkg error)
Update not working (dpkg error)
Post by ronee » Sun Jul 21, 2019 10:34 pm
Hi,
On a recent update the 64 bit Lenovo froze. I eventually had to turn the machine off.
Now it does not update or install new programs. I get a : «dpkg: error: need an action option»
exploring that further just leads to confusion on my part.
Re: Update not working (dpkg error)
Post by ronee » Mon Jul 22, 2019 8:51 pm
Re: Update not working (dpkg error)
Post by Spearmint2 » Mon Jul 22, 2019 9:46 pm
check link for possible solution to problem.
Something to read about it.
Re: Update not working (dpkg error)
Post by ronee » Mon Jul 22, 2019 10:33 pm
Re: Update not working (dpkg error)
Post by Spearmint2 » Tue Jul 23, 2019 2:00 am
Re: Update not working (dpkg error)
Post by ronee » Tue Jul 23, 2019 6:37 pm
Thanks for all the information!
Only problem is it is way above my skill level to do this.
So guess I am trapped at «no more updates»
I would liked to have tried the new mint version 18.
Re: Update not working (dpkg error)
Post by karlchen » Tue Jul 23, 2019 6:48 pm
When I read this:
then I seriously wonder:
Are you really running Linux Mint 17 with kernel 4.15.0-52?
Provided this is true, then
+ do you know that Mint 17 passed the end of its supported life in April 2019?
+ how did you manage to install a kernel, K4.15.0-52, on Mint 17, for which it should never have been available at all?
Would youmind posting the screen output of the terminal command inxi -Fxxxz , please? This will clear up the Mint version and a few basic details about your hardware.
Re: Update not working (dpkg error)
Post by Spearmint2 » Tue Jul 23, 2019 7:24 pm
Re: Update not working (dpkg error)
Post by ronee » Tue Jul 23, 2019 10:15 pm
Re: Update not working (dpkg error)
Post by Spearmint2 » Tue Jul 23, 2019 11:15 pm
Here’s stats on that computer.
What I think you need to do is follow the instructions for use of «nomodeset» in the release notes for the mint version # you are actually running.
Re: Update not working (dpkg error)
Post by ronee » Wed Jul 24, 2019 2:18 pm
Thanks, yes I was going by memory as which version of mint I was running and obviously made a mistake.
But just to clarify, the computer was running correctly and synaptic was running correctly. It doesn’t freeze during boot so I am not sure nomodeset will cure the problem?
The monitor is a 22 inch Lenovo and has not caused any problems . no problems until this last update crash.
Ron
Re: Update not working (dpkg error)
Post by ronee » Wed Jul 24, 2019 2:46 pm
Re: Update not working (dpkg error)
Post by ronee » Thu Jul 25, 2019 7:18 pm
Re: Update not working (dpkg error)
Post by karlchen » Fri Jul 26, 2019 6:17 am
Please, try what the error message suggests, with root privileges (they always fail to mention so):
Open a terminal window. Execute the commandline
exactly as it has been typed here.
Please, mark the commandline, which you execute, and the complete text output, which it will display, with your mouse.
Press c to copy the marked text into your clipboard.
Paste it into your next reply, please.
Best regards,
Karl
Re: Update not working (dpkg error)
Post by ronee » Fri Jul 26, 2019 2:22 pm
$ sudo dpkg —configure -a
[sudo] password for ron:
Setting up firefox-locale-en (68.0.1+linuxmint1+sylvia) .
Setting up libebml4v5:amd64 (1.3.3-1ubuntu0.1) .
Setting up linux-libc-dev:amd64 (4.4.0-157.185) .
Setting up patch (2.7.5-1ubuntu0.16.04.2) .
Setting up firefox (68.0.1+linuxmint1+sylvia) .
Please restart all running instances of firefox, or you will experience problems.
Setting up linux-firmware (1.157.22) .
update-initramfs: Generating /boot/initrd.img-4.15.0-54-generic
^Cdpkg: error processing package linux-firmware (—configure):
subprocess installed post-installation script was interrupted
Processing triggers for libc-bin (2.23-0ubuntu11) .
Errors were encountered while processing:
linux-firmware
Re: Update not working (dpkg error)
Post by karlchen » Fri Jul 26, 2019 2:54 pm
Re: Update not working (dpkg error)
Post by ronee » Fri Jul 26, 2019 3:50 pm
Sorry, I thought it had finished
Here it is again. it never stops.
It used to say version 9. I tried to install version 9 but was unable to determine it if it had?
I don’t see it now on the list so maybe I got it to install?
So is it just that I need to do the same for version 8?
thanks, Ron
$ sudo dpkg —configure -a
[sudo] password for ron:
Setting up linux-firmware (1.157.22) .
update-initramfs: Generating /boot/initrd.img-4.15.0-54-generic
W: Possible missing firmware /lib/firmware/i915/bxt_guc_ver8_7.bin for module i915
update-initramfs: Generating /boot/initrd.img-4.15.0-52-generic
W: Possible missing firmware /lib/firmware/i915/bxt_guc_ver8_7.bin for module i915
update-initramfs: Generating /boot/initrd.img-4.15.0-51-generic
W: Possible missing firmware /lib/firmware/i915/bxt_guc_ver8_7.bin for module i915
update-initramfs: Generating /boot/initrd.img-4.15.0-50-generic
W: Possible missing firmware /lib/firmware/i915/bxt_guc_ver8_7.bin for module i915
update-initramfs: Generating /boot/initrd.img-4.15.0-48-generic
W: Possible missing firmware /lib/firmware/i915/bxt_guc_ver8_7.bin for module i915
update-initramfs: Generating /boot/initrd.img-4.15.0-47-generic
W: Possible missing firmware /lib/firmware/i915/bxt_guc_ver8_7.bin for module i915
update-initramfs: Generating /boot/initrd.img-4.15.0-46-generic
W: Possible missing firmware /lib/firmware/i915/bxt_guc_ver8_7.bin for module i915
update-initramfs: Generating /boot/initrd.img-4.15.0-45-generic
W: Possible missing firmware /lib/firmware/i915/bxt_guc_ver8_7.bin for module i915
Re: Update not working (dpkg error)
Post by ronee » Fri Jul 26, 2019 4:17 pm
OK,
I downloaded bxt_guc_ver8_7.bin, installed and get this.
$ sudo dpkg —configure -a
[sudo] password for ron:
Setting up linux-firmware (1.157.22) .
update-initramfs: Generating /boot/initrd.img-4.15.0-54-generic
update-initramfs: Generating /boot/initrd.img-4.15.0-52-generic
update-initramfs: Generating /boot/initrd.img-4.15.0-51-generic
update-initramfs: Generating /boot/initrd.img-4.15.0-50-generic
repeating every 30(?) seconds
The only update showing now is (with an unmarked square) 4.15.0-55.60-16.04.2
Re: Update not working (dpkg error)
Post by karlchen » Fri Jul 26, 2019 5:45 pm
Whenever linux-firmware gets updated (and this has happened on your system), then for each boot image file in the directory /boot the file initrd.img-4.15.0-xx-generic will be re-generated incorporating the new linux-firmware.
On your system there are quite a few kernels present in /boot and as a consequence quite a few files initrd.img-4.15.0-xx-generic:
/boot/initrd.img-4.15.0-50-generic
/boot/initrd.img-4.15.0-51-generic
/boot/initrd.img-4.15.0-52-generic
/boot/initrd.img-4.15.0-54-generic
They all have been recreated.
Because the command update-initramfs comes across the 2 missing kernel modules, the screen output of update-initramfs is a bit longer than if it did not encounter those problems.
The update which you name 4.15.0-55.60-16.04.2, is this another kernel update? (I presume it is, because kernel 4.15.0-55 is the most recent kernel in kernel series 4.15.0)
In case it is kernel update 4.15.0-55.60, then you should also install it.
In order to make sure what it really is, you could execute the terminal command apt list —upgradable and post its screen output, before installing it.
Источник
I’m trying to install chrome on ubuntu 14.04. Mine is a 64 bit system.
I’m getting this error.
$ sudo dpkg –i google-chrome-stable_current_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'!`
As far as I understand, -i is an action option. What am I doing wrong?
muru
189k52 gold badges460 silver badges711 bronze badges
asked Feb 14, 2015 at 19:58
3
I’m going to guess that is a command you copied from a website or something like that, because that dash in front of the i is not a hyphen (or minus), but an en-dash:
$ od -c <<<"–"
0000000 342 200 223 n
0000004
$ od -c <<<"-"
0000000 - n
0000002
Use a proper - instead.
And don’t use dpkg unless you need to; the Software Centre can handle .deb files just fine, just double click on the file, or do xdg-open google-chrome-stable_current_amd64.deb.
answered Feb 14, 2015 at 20:04
murumuru
189k52 gold badges460 silver badges711 bronze badges
2
Not really sure what has caused this breakage.
here’s the relevant portion of the log:
backend-builder: [2017-02-22T20:50:58+00:00] INFO: Processing directory[/etc/apt/preferences.d] action create (/tmp/packer-chef-client/cache/cookbooks/apt/providers/preference.rb line 42)
backend-builder: [2017-02-22T20:50:58+00:00] INFO: Processing file[/etc/apt/preferences.d/filebeat.pref] action delete (/tmp/packer-chef-client/cache/cookbooks/apt/providers/preference.rb line 52)
backend-builder: [2017-02-22T20:50:58+00:00] INFO: Processing file[/etc/apt/preferences.d/filebeat] action delete (/tmp/packer-chef-client/cache/cookbooks/apt/providers/preference.rb line 60)
backend-builder: [2017-02-22T20:50:58+00:00] INFO: Processing file[/etc/apt/preferences.d/filebeat.pref] action create (/tmp/packer-chef-client/cache/cookbooks/apt/providers/preference.rb line 67)
backend-builder: [2017-02-22T20:50:58+00:00] INFO: file[/etc/apt/preferences.d/filebeat.pref] created file /etc/apt/preferences.d/filebeat.pref
backend-builder: [2017-02-22T20:50:58+00:00] INFO: file[/etc/apt/preferences.d/filebeat.pref] updated file contents /etc/apt/preferences.d/filebeat.pref
backend-builder: [2017-02-22T20:50:58+00:00] INFO: file[/etc/apt/preferences.d/filebeat.pref] owner changed to 0
backend-builder: [2017-02-22T20:50:58+00:00] INFO: file[/etc/apt/preferences.d/filebeat.pref] group changed to 0
backend-builder: [2017-02-22T20:50:58+00:00] INFO: file[/etc/apt/preferences.d/filebeat.pref] mode changed to 644
backend-builder: [2017-02-22T20:50:58+00:00] INFO: Processing apt_package[filebeat] action install (filebeat::install_package line 57)
backend-builder:
backend-builder: ================================================================================
backend-builder: Error executing action `install` on resource 'apt_package[filebeat]'
backend-builder: ================================================================================
backend-builder:
backend-builder: Mixlib::ShellOut::ShellCommandFailed
backend-builder: ------------------------------------
backend-builder: Expected process to exit with [0], but received '100'
backend-builder: ---- Begin output of ["apt-get", "-q", "-y", "-o", "Dpkg::Options::='--force-confnew'", "install", "filebeat=1.3.1"] ----
backend-builder: STDOUT: Reading package lists...
backend-builder: Building dependency tree...
backend-builder: Reading state information...
backend-builder: The following NEW packages will be installed:
backend-builder: filebeat
backend-builder: 0 upgraded, 1 newly installed, 0 to remove and 135 not upgraded.
backend-builder: Need to get 4255 kB of archives.
backend-builder: After this operation, 12.6 MB of additional disk space will be used.
backend-builder: Get:1 https://packages.elastic.co/beats/apt/ stable/main filebeat amd64 1.3.1 [4255 kB]
backend-builder: Fetched 4255 kB in 1s (3414 kB/s)
backend-builder: STDERR: dpkg: error: need an action option
backend-builder:
backend-builder: Type dpkg --help for help about installing and deinstalling packages [*];
backend-builder: Use 'apt' or 'aptitude' for user-friendly package management;
backend-builder: Type dpkg -Dhelp for a list of dpkg debug flag values;
backend-builder: Type dpkg --force-help for a list of forcing options;
backend-builder: Type dpkg-deb --help for help about manipulating *.deb files;
backend-builder:
backend-builder: Options marked [*] produce a lot of output - pipe it through 'less' or 'more' !
backend-builder: E: Sub-process /usr/bin/dpkg returned an error code (2)
backend-builder: ---- End output of ["apt-get", "-q", "-y", "-o", "Dpkg::Options::='--force-confnew'", "install", "filebeat=1.3.1"] ----
backend-builder: Ran ["apt-get", "-q", "-y", "-o", "Dpkg::Options::='--force-confnew'", "install", "filebeat=1.3.1"] returned 100
backend-builder:
backend-builder: Resource Declaration:
backend-builder: ---------------------
backend-builder: # In /tmp/packer-chef-client/cache/cookbooks/filebeat/recipes/install_package.rb
backend-builder:
backend-builder: 57: package 'filebeat' do # ~FC009
backend-builder: 58: version version_string
backend-builder: 59: options node['filebeat']['apt']['options'] if node['filebeat']['apt']['options'] && node['platform_family'] == 'debian'
backend-builder: 60: notifies :restart, 'service[filebeat]' if node['filebeat']['notify_restart'] && !node['filebeat']['disable_service']
backend-builder: 61: flush_cache(:before => true) if node['platform_family'] == 'rhel'
backend-builder: 62: allow_downgrade true if node['platform_family'] == 'rhel'
backend-builder: 63: end
backend-builder:
backend-builder: Compiled Resource:
backend-builder: ------------------
backend-builder: # Declared in /tmp/packer-chef-client/cache/cookbooks/filebeat/recipes/install_package.rb:57:in `from_file'
backend-builder:
backend-builder: apt_package("filebeat") do
backend-builder: package_name "filebeat"
backend-builder: action [:install]
backend-builder: retries 0
backend-builder: retry_delay 2
backend-builder: default_guard_interpreter :default
backend-builder: declared_type :package
backend-builder: cookbook_name "filebeat"
backend-builder: recipe_name "install_package"
backend-builder: version "1.3.1"
backend-builder: options "-o Dpkg::Options::='--force-confnew'"
backend-builder: end
backend-builder:
backend-builder: Platform:
backend-builder: ---------
backend-builder: x86_64-linux
backend-builder:
backend-builder: [2017-02-22T20:51:00+00:00] INFO: Running queued delayed notifications before re-raising exception
This happens on both 0.3.9 and 0.4.8 (that i’ve tried).
I am basically using the default (apt) attribute values (i.e. not overriding really anything through environment), and this is all on ubuntu 14.04.
Any more specific info, just let me know plz







