[solved] "apt-get upgrade" returns "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
spiccato

[solved] "apt-get upgrade" returns "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Post by spiccato »

I just got Linux mint yesterday, It's my first time using Linux. Every time I try any commands of use I get this error. Please help.

Code: Select all

Errors were encountered while processing:
 file
E: Sub-process /usr/bin/dpkg returned an error code (1)
Last edited by karlchen on Sat Aug 18, 2018 4:59 am, edited 2 times in total.
Reason: Marked as [solved] because spiccato confirmed it is here: https://forums.linuxmint.com/viewtopic.php?f=90&t=275118#p1513851
User avatar
karlchen
Level 23
Level 23
Posts: 18238
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: I can't use terminal.

Post by karlchen »

Hello, spiccato.

Please, post the screen output, generated by the terminal command

Code: Select all

inxi -Sx
because we would like to know which Linux Mint release and edition precisely you are using.
Next, please, tell us which command you executed when you received the error message, which you had posted. As a rule such "dpkg" error messages will be triggered by particular "apt-get" commands, not by any random terminal commands.

Regards,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: I can't use terminal.

Post by catweazel »

spiccato wrote: Tue Aug 07, 2018 4:04 am I just got Linux mint yesterday, It's my first time using Linux. Every time I try any commands of use I get this error. Please help.

Code: Select all

Errors were encountered while processing:
 file
E: Sub-process /usr/bin/dpkg returned an error code (1)
What is the command you're using?
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
spiccato

Re: I can't use terminal.

Post by spiccato »

apt-get upgrade
Sir Charles

Re: I can't use terminal.

Post by Sir Charles »

Would you please post the output of

Code: Select all

inxi -Sx 
you were asked to before by karlchen?
And please do reproduce the whole of the terminal output when you try to run the command to give the people something to work on.
spiccato

Re: "apt-get upgrade" returns "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Post by spiccato »

noxit@hotguy ~ $ inxi -Sx
System: Host: box-lock Kernel: 4.15.0-29-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Cinnamon 3.6.7 (Gtk 3.18.9-1ubuntu3.3)
Distro: Linux Mint 18.3 Sylvia
spiccato

Re: "apt-get upgrade" returns "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Post by spiccato »

also its whenever I try to use apt-get install
ralplpcr
Level 6
Level 6
Posts: 1096
Joined: Tue Jul 28, 2015 10:11 am

Re: "apt-get upgrade" returns "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Post by ralplpcr »

spiccato wrote: Fri Aug 10, 2018 8:16 pm also its whenever I try to use apt-get install
In Mint, apt, apt-get and other similar commands are restricted to elevated privileges. In order for them to execute properly, you must use sudo before them:

Code: Select all

sudo apt-get upgrade
You'll be prompted to enter a password once you press enter.
It will *NOT* show any "*" characters while you're typing it - - this is normal.
spiccato

Re: "apt-get upgrade" returns "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Post by spiccato »

Even with sudo, I still get the same error code.

Code: Select all

sudo apt-get update
[sudo] password for noxit: 
Ign:1 http://packages.linuxmint.com sylvia InRelease
Hit:2 http://packages.linuxmint.com sylvia Release                             
Hit:3 http://archive.canonical.com/ubuntu xenial InRelease                     
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]     
Hit:5 http://archive.linux.duke.edu/ubuntu xenial InRelease                    
Get:6 http://ppa.launchpad.net/qbittorrent-team/qbittorrent-stable/ubuntu xenial InRelease [18.1 kB]
Get:7 http://archive.linux.duke.edu/ubuntu xenial-updates InRelease [109 kB]   
Get:9 http://archive.linux.duke.edu/ubuntu xenial-backports InRelease [107 kB] 
Hit:10 http://repo.steampowered.com/steam precise InRelease                    
Get:11 http://ppa.launchpad.net/qbittorrent-team/qbittorrent-stable/ubuntu xenial/main Sources [1,424 B]
Get:12 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [539 kB]
Get:13 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 Packages [831 kB]
Get:14 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages [472 kB]
Get:15 http://ppa.launchpad.net/qbittorrent-team/qbittorrent-stable/ubuntu xenial/main amd64 Packages [2,436 B]
Get:16 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [229 kB]
Get:17 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [367 kB]
Get:18 http://security.ubuntu.com/ubuntu xenial-security/universe i386 Packages [311 kB]
Get:19 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [138 kB]
Get:20 http://ppa.launchpad.net/qbittorrent-team/qbittorrent-stable/ubuntu xenial/main i386 Packages [2,436 B]
Get:21 http://archive.linux.duke.edu/ubuntu xenial-updates/main i386 Packages [754 kB]
Get:22 http://archive.linux.duke.edu/ubuntu xenial-updates/main Translation-en [341 kB]
Get:23 http://archive.linux.duke.edu/ubuntu xenial-updates/universe amd64 Packages [680 kB]
Get:24 http://archive.linux.duke.edu/ubuntu xenial-updates/universe i386 Packages [619 kB]
Get:25 http://archive.linux.duke.edu/ubuntu xenial-updates/universe Translation-en [274 kB]
Fetched 5,903 kB in 8s (717 kB/s)                                              
Reading package lists... Done
noxit@box-lock ~ $ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  fonts-opensymbol libreoffice-avmedia-backend-gstreamer libreoffice-base
  libreoffice-base-core libreoffice-base-drivers libreoffice-calc
  libreoffice-common libreoffice-core libreoffice-draw libreoffice-gnome
  libreoffice-gtk libreoffice-impress libreoffice-java-common libreoffice-math
  libreoffice-ogltrans libreoffice-pdfimport libreoffice-sdbc-firebird
  libreoffice-sdbc-hsqldb libreoffice-writer libsmbclient
  libtorrent-rasterbar9 libwbclient0 libxml2:i386 libxml2 linux-libc-dev
  python-libxml2 python-samba python3-uno samba-common samba-common-bin
  samba-libs smbclient uno-libs3 ure
34 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 86.8 MB/86.8 MB of archives.
After this operation, 6,144 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 libreoffice-java-common all 1:5.1.6~rc2-0ubuntu1~xenial4 [1,942 kB]
Get:2 http://ppa.launchpad.net/qbittorrent-team/qbittorrent-stable/ubuntu xenial/main amd64 libtorrent-rasterbar9 amd64 1.1.9+git20180812.0bcf6cef23+patched-configure-1ppa1~xenial1 [961 kB]
Get:3 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 libreoffice-ogltrans amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [73.3 kB]
Get:4 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 ure amd64 5.1.6~rc2-0ubuntu1~xenial4 [1,532 kB]
Get:5 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 uno-libs3 amd64 5.1.6~rc2-0ubuntu1~xenial4 [704 kB]
Get:6 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 libreoffice-calc amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [6,463 kB]
Get:7 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 libreoffice-impress amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [969 kB]
Get:8 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 libreoffice-draw amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [2,410 kB]
Get:9 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 libreoffice-gnome amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [60.7 kB]
Get:10 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 libreoffice-gtk amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [207 kB]
Get:11 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 libreoffice-writer amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [7,581 kB]
Get:12 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 python3-uno amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [137 kB]
Get:13 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 libreoffice-sdbc-hsqldb amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [107 kB]
Get:14 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 libreoffice-sdbc-firebird amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [3,032 B]
Get:15 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 libreoffice-common all 1:5.1.6~rc2-0ubuntu1~xenial4 [22.4 MB]
Get:16 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 libreoffice-pdfimport amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [182 kB]
Get:17 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 libreoffice-math amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [374 kB]
Get:18 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 libreoffice-base-core amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [714 kB]
Get:19 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 libreoffice-avmedia-backend-gstreamer amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [24.3 kB]
Get:20 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 libreoffice-base amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [1,519 kB]
Get:21 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 libreoffice-core amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [28.2 MB]
Get:22 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 libreoffice-base-drivers amd64 1:5.1.6~rc2-0ubuntu1~xenial4 [510 kB]
Get:23 http://archive.linux.duke.edu/ubuntu xenial-updates/main i386 libxml2 i386 2.9.3+dfsg1-1ubuntu0.6 [732 kB]
Get:24 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 libxml2 amd64 2.9.3+dfsg1-1ubuntu0.6 [697 kB]
Get:25 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 fonts-opensymbol all 2:102.7+LibO5.1.6~rc2-0ubuntu1~xenial4 [104 kB]
Get:26 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 python-samba amd64 2:4.3.11+dfsg-0ubuntu0.16.04.15 [1,060 kB]
Get:27 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 samba-common-bin amd64 2:4.3.11+dfsg-0ubuntu0.16.04.15 [506 kB]
Get:28 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 smbclient amd64 2:4.3.11+dfsg-0ubuntu0.16.04.15 [311 kB]
Get:29 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 samba-libs amd64 2:4.3.11+dfsg-0ubuntu0.16.04.15 [5,159 kB]
Get:30 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 libwbclient0 amd64 2:4.3.11+dfsg-0ubuntu0.16.04.15 [30.2 kB]
Get:31 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 libsmbclient amd64 2:4.3.11+dfsg-0ubuntu0.16.04.15 [53.4 kB]
Get:32 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 samba-common all 2:4.3.11+dfsg-0ubuntu0.16.04.15 [83.7 kB]
Get:33 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 linux-libc-dev amd64 4.4.0-133.159 [861 kB]
Get:34 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 python-libxml2 amd64 2.9.3+dfsg1-1ubuntu0.6 [141 kB]
Fetched 86.8 MB in 1min 33s (928 kB/s)                                         
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 252590 files and directories currently installed.)
Preparing to unpack .../libreoffice-java-common_1%3a5.1.6~rc2-0ubuntu1~xenial4_all.deb ...
Unpacking libreoffice-java-common (1:5.1.6~rc2-0ubuntu1~xenial4) over (1:5.1.6~rc2-0ubuntu1~xenial3) ...
Preparing to unpack .../libreoffice-ogltrans_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb ...
Unpacking libreoffice-ogltrans (1:5.1.6~rc2-0ubuntu1~xenial4) over (1:5.1.6~rc2-0ubuntu1~xenial3) ...
Preparing to unpack .../ure_5.1.6~rc2-0ubuntu1~xenial4_amd64.deb ...
Unpacking ure (5.1.6~rc2-0ubuntu1~xenial4) over (5.1.6~rc2-0ubuntu1~xenial3) ...
Preparing to unpack .../uno-libs3_5.1.6~rc2-0ubuntu1~xenial4_amd64.deb ...
Unpacking uno-libs3 (5.1.6~rc2-0ubuntu1~xenial4) over (5.1.6~rc2-0ubuntu1~xenial3) ...
Preparing to unpack .../libreoffice-calc_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb ...
Unpacking libreoffice-calc (1:5.1.6~rc2-0ubuntu1~xenial4) over (1:5.1.6~rc2-0ubuntu1~xenial3) ...
Preparing to unpack .../libreoffice-impress_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb ...
Unpacking libreoffice-impress (1:5.1.6~rc2-0ubuntu1~xenial4) over (1:5.1.6~rc2-0ubuntu1~xenial3) ...
Preparing to unpack .../libreoffice-draw_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb ...
Unpacking libreoffice-draw (1:5.1.6~rc2-0ubuntu1~xenial4) over (1:5.1.6~rc2-0ubuntu1~xenial3) ...
Preparing to unpack .../libreoffice-gnome_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb ...
Unpacking libreoffice-gnome (1:5.1.6~rc2-0ubuntu1~xenial4) over (1:5.1.6~rc2-0ubuntu1~xenial3) ...
Preparing to unpack .../libreoffice-gtk_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb ...
Unpacking libreoffice-gtk (1:5.1.6~rc2-0ubuntu1~xenial4) over (1:5.1.6~rc2-0ubuntu1~xenial3) ...
Preparing to unpack .../libreoffice-writer_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb ...
Unpacking libreoffice-writer (1:5.1.6~rc2-0ubuntu1~xenial4) over (1:5.1.6~rc2-0ubuntu1~xenial3) ...
Preparing to unpack .../python3-uno_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb ...
Unpacking python3-uno (1:5.1.6~rc2-0ubuntu1~xenial4) over (1:5.1.6~rc2-0ubuntu1~xenial3) ...
Preparing to unpack .../libreoffice-sdbc-hsqldb_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb ...
Unpacking libreoffice-sdbc-hsqldb (1:5.1.6~rc2-0ubuntu1~xenial4) over (1:5.1.6~rc2-0ubuntu1~xenial3) ...
Preparing to unpack .../libreoffice-sdbc-firebird_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb ...
Unpacking libreoffice-sdbc-firebird (1:5.1.6~rc2-0ubuntu1~xenial4) over (1:5.1.6~rc2-0ubuntu1~xenial3) ...
Preparing to unpack .../libreoffice-common_1%3a5.1.6~rc2-0ubuntu1~xenial4_all.deb ...
Unpacking libreoffice-common (1:5.1.6~rc2-0ubuntu1~xenial4) over (1:5.1.6~rc2-0ubuntu1~xenial3) ...
Preparing to unpack .../libreoffice-pdfimport_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb ...
Unpacking libreoffice-pdfimport (1:5.1.6~rc2-0ubuntu1~xenial4) over (1:5.1.6~rc2-0ubuntu1~xenial3) ...
Preparing to unpack .../libreoffice-math_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb ...
Unpacking libreoffice-math (1:5.1.6~rc2-0ubuntu1~xenial4) over (1:5.1.6~rc2-0ubuntu1~xenial3) ...
Preparing to unpack .../libreoffice-base-core_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb ...
Unpacking libreoffice-base-core (1:5.1.6~rc2-0ubuntu1~xenial4) over (1:5.1.6~rc2-0ubuntu1~xenial3) ...
Preparing to unpack .../libreoffice-avmedia-backend-gstreamer_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb ...
Unpacking libreoffice-avmedia-backend-gstreamer (1:5.1.6~rc2-0ubuntu1~xenial4) over (1:5.1.6~rc2-0ubuntu1~xenial3) ...
Preparing to unpack .../libreoffice-base_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb ...
Unpacking libreoffice-base (1:5.1.6~rc2-0ubuntu1~xenial4) over (1:5.1.6~rc2-0ubuntu1~xenial3) ...
Preparing to unpack .../libreoffice-core_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb ...
Unpacking libreoffice-core (1:5.1.6~rc2-0ubuntu1~xenial4) over (1:5.1.6~rc2-0ubuntu1~xenial3) ...
Preparing to unpack .../libreoffice-base-drivers_1%3a5.1.6~rc2-0ubuntu1~xenial4_amd64.deb ...
Unpacking libreoffice-base-drivers (1:5.1.6~rc2-0ubuntu1~xenial4) over (1:5.1.6~rc2-0ubuntu1~xenial3) ...
Preparing to unpack .../libxml2_2.9.3+dfsg1-1ubuntu0.6_amd64.deb ...
De-configuring libxml2:i386 (2.9.3+dfsg1-1ubuntu0.5) ...
Unpacking libxml2:amd64 (2.9.3+dfsg1-1ubuntu0.6) over (2.9.3+dfsg1-1ubuntu0.5) ...
Preparing to unpack .../libxml2_2.9.3+dfsg1-1ubuntu0.6_i386.deb ...
Unpacking libxml2:i386 (2.9.3+dfsg1-1ubuntu0.6) over (2.9.3+dfsg1-1ubuntu0.5) ...
Preparing to unpack .../fonts-opensymbol_2%3a102.7+LibO5.1.6~rc2-0ubuntu1~xenial4_all.deb ...
Unpacking fonts-opensymbol (2:102.7+LibO5.1.6~rc2-0ubuntu1~xenial4) over (2:102.7+LibO5.1.6~rc2-0ubuntu1~xenial3) ...
Preparing to unpack .../libtorrent-rasterbar9_1.1.9+git20180812.0bcf6cef23+patched-configure-1ppa1~xenial1_amd64.deb ...
Unpacking libtorrent-rasterbar9 (1.1.9+git20180812.0bcf6cef23+patched-configure-1ppa1~xenial1) over (1.1.7+git20180527.6ec6c1b340+patched-configure1-1ppa1~xenial1) ...
Preparing to unpack .../python-samba_2%3a4.3.11+dfsg-0ubuntu0.16.04.15_amd64.deb ...
Unpacking python-samba (2:4.3.11+dfsg-0ubuntu0.16.04.15) over (2:4.3.11+dfsg-0ubuntu0.16.04.13) ...
Preparing to unpack .../samba-common-bin_2%3a4.3.11+dfsg-0ubuntu0.16.04.15_amd64.deb ...
Unpacking samba-common-bin (2:4.3.11+dfsg-0ubuntu0.16.04.15) over (2:4.3.11+dfsg-0ubuntu0.16.04.13) ...
Preparing to unpack .../smbclient_2%3a4.3.11+dfsg-0ubuntu0.16.04.15_amd64.deb ...
Unpacking smbclient (2:4.3.11+dfsg-0ubuntu0.16.04.15) over (2:4.3.11+dfsg-0ubuntu0.16.04.13) ...
Preparing to unpack .../samba-libs_2%3a4.3.11+dfsg-0ubuntu0.16.04.15_amd64.deb ...
Unpacking samba-libs:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.15) over (2:4.3.11+dfsg-0ubuntu0.16.04.13) ...
Preparing to unpack .../libwbclient0_2%3a4.3.11+dfsg-0ubuntu0.16.04.15_amd64.deb ...
Unpacking libwbclient0:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.15) over (2:4.3.11+dfsg-0ubuntu0.16.04.13) ...
Preparing to unpack .../libsmbclient_2%3a4.3.11+dfsg-0ubuntu0.16.04.15_amd64.deb ...
Unpacking libsmbclient:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.15) over (2:4.3.11+dfsg-0ubuntu0.16.04.13) ...
Preparing to unpack .../samba-common_2%3a4.3.11+dfsg-0ubuntu0.16.04.15_all.deb ...
Unpacking samba-common (2:4.3.11+dfsg-0ubuntu0.16.04.15) over (2:4.3.11+dfsg-0ubuntu0.16.04.13) ...
Preparing to unpack .../linux-libc-dev_4.4.0-133.159_amd64.deb ...
Unpacking linux-libc-dev:amd64 (4.4.0-133.159) over (4.4.0-131.157) ...
Preparing to unpack .../python-libxml2_2.9.3+dfsg1-1ubuntu0.6_amd64.deb ...
Unpacking python-libxml2 (2.9.3+dfsg1-1ubuntu0.6) over (2.9.3+dfsg1-1ubuntu0.5) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for desktop-file-utils (0.22+linuxmint1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for gnome-icon-theme (3.12.0-1ubuntu3) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1.1) ...
Processing triggers for fontconfig (2.11.94-0ubuntu1.1) ...
dpkg: error processing package file (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Setting up uno-libs3 (5.1.6~rc2-0ubuntu1~xenial4) ...
Setting up libxml2:amd64 (2.9.3+dfsg1-1ubuntu0.6) ...
Setting up libxml2:i386 (2.9.3+dfsg1-1ubuntu0.6) ...
Setting up ure (5.1.6~rc2-0ubuntu1~xenial4) ...
Setting up libreoffice-common (1:5.1.6~rc2-0ubuntu1~xenial4) ...
Installing new version of config file /etc/bash_completion.d/libreoffice.sh ...
Setting up libreoffice-java-common (1:5.1.6~rc2-0ubuntu1~xenial4) ...
Setting up fonts-opensymbol (2:102.7+LibO5.1.6~rc2-0ubuntu1~xenial4) ...
Setting up libreoffice-core (1:5.1.6~rc2-0ubuntu1~xenial4) ...
Setting up libreoffice-draw (1:5.1.6~rc2-0ubuntu1~xenial4) ...
Setting up libreoffice-impress (1:5.1.6~rc2-0ubuntu1~xenial4) ...
Setting up libreoffice-ogltrans (1:5.1.6~rc2-0ubuntu1~xenial4) ...
Setting up libreoffice-base-core (1:5.1.6~rc2-0ubuntu1~xenial4) ...
Setting up libreoffice-calc (1:5.1.6~rc2-0ubuntu1~xenial4) ...
Setting up libreoffice-gtk (1:5.1.6~rc2-0ubuntu1~xenial4) ...
Setting up libreoffice-gnome (1:5.1.6~rc2-0ubuntu1~xenial4) ...
Setting up libreoffice-writer (1:5.1.6~rc2-0ubuntu1~xenial4) ...
Setting up python3-uno (1:5.1.6~rc2-0ubuntu1~xenial4) ...
Setting up libreoffice-sdbc-hsqldb (1:5.1.6~rc2-0ubuntu1~xenial4) ...
Setting up libreoffice-sdbc-firebird (1:5.1.6~rc2-0ubuntu1~xenial4) ...
Setting up libreoffice-pdfimport (1:5.1.6~rc2-0ubuntu1~xenial4) ...
Setting up libreoffice-math (1:5.1.6~rc2-0ubuntu1~xenial4) ...
Setting up libreoffice-avmedia-backend-gstreamer (1:5.1.6~rc2-0ubuntu1~xenial4) ...
Setting up libreoffice-base-drivers (1:5.1.6~rc2-0ubuntu1~xenial4) ...
Setting up libreoffice-base (1:5.1.6~rc2-0ubuntu1~xenial4) ...
Setting up libtorrent-rasterbar9 (1.1.9+git20180812.0bcf6cef23+patched-configure-1ppa1~xenial1) ...
Setting up libwbclient0:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.15) ...
Setting up samba-libs:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.15) ...
Setting up python-samba (2:4.3.11+dfsg-0ubuntu0.16.04.15) ...
Setting up samba-common (2:4.3.11+dfsg-0ubuntu0.16.04.15) ...
Setting up samba-common-bin (2:4.3.11+dfsg-0ubuntu0.16.04.15) ...
Setting up libsmbclient:amd64 (2:4.3.11+dfsg-0ubuntu0.16.04.15) ...
Setting up smbclient (2:4.3.11+dfsg-0ubuntu0.16.04.15) ...
Setting up linux-libc-dev:amd64 (4.4.0-133.159) ...
Setting up python-libxml2 (2.9.3+dfsg1-1ubuntu0.6) ...
Processing triggers for shared-mime-info (1.5-2ubuntu0.2) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
 file
E: Sub-process /usr/bin/dpkg returned an error code (1)
gm10

Re: "apt-get upgrade" returns "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Post by gm10 »

Code: Select all

Processing triggers for fontconfig (2.11.94-0ubuntu1.1) ...
dpkg: error processing package file (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
So try

Code: Select all

apt install -f --reinstall fontconfig
spiccato

Re: "apt-get upgrade" returns "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Post by spiccato »

Code: Select all

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.
1 not fully installed or removed.
Need to get 178 kB/199 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://archive.linux.duke.edu/ubuntu xenial-updates/main amd64 fontconfig amd64 2.11.94-0ubuntu1.1 [178 kB]
Fetched 178 kB in 0s (208 kB/s)     
(Reading database ... 252590 files and directories currently installed.)
Preparing to unpack .../fontconfig_2.11.94-0ubuntu1.1_amd64.deb ...
Unpacking fontconfig (2.11.94-0ubuntu1.1) over (2.11.94-0ubuntu1.1) ...
Processing triggers for doc-base (0.10.7) ...
Processing 1 changed doc-base file...
Registering documents with scrollkeeper...
Processing triggers for man-db (2.7.5-1) ...
Setting up fontconfig (2.11.94-0ubuntu1.1) ...
Regenerating fonts cache... done.
dpkg: error processing package file (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Errors were encountered while processing:
 file
E: Sub-process /usr/bin/dpkg returned an error code (1)
still not working
gm10

Re: "apt-get upgrade" returns "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Post by gm10 »

spiccato wrote: Fri Aug 17, 2018 5:45 amstill not working
Ok, in that case try it like this:

Code: Select all

sudo dpkg --remove --force-remove-reinstreq fontconfig
apt install fontconfig
apt install -f
spiccato

Re: "apt-get upgrade" returns "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Post by spiccato »

Code: Select all

 sudo dpkg --remove --force-remove-reinstreq fontconfig
dpkg: dependency problems prevent removal of fontconfig:
 adobe-flashplugin depends on fontconfig.
 libpango-1.0-0:amd64 depends on fontconfig (>= 2.1.91).
 libqt5gui5:amd64 depends on fontconfig.
 libreoffice-core depends on fontconfig.
 libqtgui4:amd64 depends on fontconfig.

dpkg: error processing package fontconfig (--remove):
 dependency problems - not removing
Errors were encountered while processing:
 fontconfig
noxit@box-lock ~ $ apt install fontconfig
Reading package lists... Done
Building dependency tree       
Reading state information... Done
fontconfig is already the newest version (2.11.94-0ubuntu1.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/21.2 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: error processing package file (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Errors were encountered while processing:
 file
E: Sub-process /usr/bin/dpkg returned an error code (1)
noxit@box-lock ~ $ apt install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/21.2 kB of archives.
After this operation, 0 B of additional disk space will be used.
dpkg: error processing package file (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Errors were encountered while processing:
 file
E: Sub-process /usr/bin/dpkg returned an error code (1)
gm10

Re: "apt-get upgrade" returns "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Post by gm10 »

My bad, should have thought of dependencies. Run it like this:

Code: Select all

sudo dpkg --remove --force-remove-reinstreq --force-depends fontconfig
If that goes through, and it should now, do

Code: Select all

apt install fontconfig
apt install -f
spiccato

Re: "apt-get upgrade" returns "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Post by spiccato »

Code: Select all

apt install fontconfig
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  fontconfig
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/199 kB of archives.
After this operation, 554 kB of additional disk space will be used.
Selecting previously unselected package fontconfig.
(Reading database ... 252561 files and directories currently installed.)
Preparing to unpack .../fontconfig_2.11.94-0ubuntu1.1_amd64.deb ...
Unpacking fontconfig (2.11.94-0ubuntu1.1) ...
Processing triggers for doc-base (0.10.7) ...
Processing 1 added doc-base file...
Registering documents with scrollkeeper...
Processing triggers for man-db (2.7.5-1) ...
Setting up fontconfig (2.11.94-0ubuntu1.1) ...
Regenerating fonts cache... done.
dpkg: error processing package file (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Errors were encountered while processing:
 file
E: Sub-process /usr/bin/dpkg returned an error code (1)
This one doesn't work.

Code: Select all

sudo dpkg --remove --force-remove-reinstreq --force-depends fontconfig

This one works fine.
gm10

Re: "apt-get upgrade" returns "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Post by gm10 »

That is a weird one. Try

Code: Select all

sudo dpkg --remove --force-remove-reinstreq --force-depends fontconfig
apt clean
sudo dpkg --configure -a
apt install -f
apt check
If that still fails, as I have a feeling in might, maybe this gives us some more information:

Code: Select all

dpkg --audit
By the way, there's always the option to just re-install Mint and not do what you did last time to break it. ;)
spiccato

Re: "apt-get upgrade" returns "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Post by spiccato »

Code: Select all

The following packages are in a mess due to serious problems during
installation.  They must be reinstalled for them (and any packages
that depend on them) to function properly:
 file                 Determines file type using "magic" numbers
I'll just reinstall if nothing can be done here.
gm10

Re: "apt-get upgrade" returns "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Post by gm10 »

Everything that can be broken can be fixed, no worries. Wondering what happened to your system to get it into this state so shortly after install though.

I had missed the file package in the error message above. Let's nuke that one as well:

Code: Select all

sudo dpkg --remove --force-remove-reinstreq --force-depends file
apt install -f
apt check
apt install file
spiccato

Re: "apt-get upgrade" returns "E: Sub-process /usr/bin/dpkg returned an error code (1)"

Post by spiccato »

Okay, everything is working now. Thank you so much.
Locked

Return to “Beginner Questions”