Posts: 1
Joined: Fri Mar 17, 2017 2:52 pm

dpkg returned an error code (1)

Fri Mar 17, 2017 3:09 pm

Hi everyone.
I recently tried to do an apt-get upgrade, only to end up with this error message

Code: Select all

The following packages have unmet dependencies:
 libavresample-dev : Depends: libavutil-dev (= 6:11.8-1~deb8u1+rpi1) but it is not installed
I then run a apt-get -f install as recommanded and get this error message instead:

Code: Select all

dpkg: error processing archive /var/cache/apt/archives/libavutil-dev_6%3a11.8-1~deb8u1+rpi1_armhf.deb (--unpack):
 trying to overwrite '/usr/include/libavutil/adler32.h', which is also in package ffmpeg 3.1.1-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
I have tried to install the incriminated package by itself but got the same error.
If there is a way to fix this issue, by all means do notify me.
Any advice is greatly appreciated.

Posts: 1380
Joined: Fri Dec 26, 2014 7:53 pm

Re: dpkg returned an error code (1)

Sun Mar 19, 2017 12:42 am

FFmpeg and Libav share many of the same library and other file names. It probably will not be easy or at all possible to have them both completely installed without causing problems like you have here. The last time I checked, FFmpeg will be preferred going forward in Debian/Raspbian Stretch. It's possible that you have some combination of packages installed (maybe you have packages from both Jessie and Stretch installed) which together put your system in a situation were it wants to have both FFmpeg and Libav installed.

More information:

Posts: 4
Joined: Thu Apr 06, 2017 9:53 am

Re: dpkg returned an error code (1)

Thu Apr 20, 2017 1:07 pm

I'm getting the same issue.

Posts: 111
Joined: Sun Nov 18, 2012 12:02 am

Re: dpkg returned an error code (1)

Thu Jul 13, 2017 4:43 am

Same here, while trying to install Google Assistant as per https://developers.google.com/assistant ... run-sample

I tried removing ffmpeg by these commands but neither worked:

sudo apt-get remove ffmpeg

sudo apt-get remove --purge ffmpeg

I also tried temporarily removing the offending clash but still got the error anyway:

sudo mv /usr/include/libavutil/adler32.h /usr/include/libavutil/adler32.h-prev

how do I remove ffmpeg?

(btw I believe ffmpeg was installed when I installed the 'motion' package)

Posts: 111
Joined: Sun Nov 18, 2012 12:02 am

Re: dpkg returned an error code (1)

Thu Jul 13, 2017 1:42 pm


[email protected]:~/src/listener-2.2 08:36 $ dpkg --get-selections|fgrep ffm
ffmpeg install
[email protected]:~/src/listener-2.2 08:36 $ sudo dpkg --remove ffmpeg
(Reading database ... 124393 files and directories currently installed.)
Removing ffmpeg (3.1.1-1) ...
dpkg: warning: while removing ffmpeg, directory '/usr/include/libavutil' not empty so not removed
Processing triggers for man-db ( ...
[email protected]:~/src/listener-2.2 08:38 $ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libavresample-dev libavutil-dev
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 278 not upgraded.
22 not fully installed or removed.
Need to get 0 B/183 kB of archives.
After this operation, 561 kB of additional disk space will be used.
Do you want to continue? [Y/n]
(Reading database ... 124007 files and directories currently installed.)
Preparing to unpack .../libavutil-dev_6%3a11.9-1~deb8u1+rpi1_armhf.deb ...
Unpacking libavutil-dev (6:11.9-1~deb8u1+rpi1) ...
Setting up libssl1.0.0:armhf (1.0.1t-1+deb8u6) ...
Setting up libgssrpc4:armhf (1.12.1+dfsg-19+deb8u2) ...
Setting up libkadm5clnt-mit9:armhf (1.12.1+dfsg-19+deb8u2) ...
Setting up libkdb5-7:armhf (1.12.1+dfsg-19+deb8u2) ...
Setting up libkadm5srv-mit9:armhf (1.12.1+dfsg-19+deb8u2) ...
Setting up libavutil54:armhf (6:11.9-1~deb8u1+rpi1) ...
Setting up libavresample2:armhf (6:11.9-1~deb8u1+rpi1) ...
Setting up libavcodec56:armhf (6:11.9-1~deb8u1+rpi1) ...
Setting up libavformat56:armhf (6:11.9-1~deb8u1+rpi1) ...
Setting up mysql-common (5.5.55-0+deb8u1) ...
Setting up libmysqlclient18:armhf (5.5.55-0+deb8u1) ...
Setting up libpq5:armhf (9.4.12-0+deb8u1) ...
Setting up libc-dev-bin (2.19-18+deb8u10) ...
Setting up libc6-dev:armhf (2.19-18+deb8u10) ...
Setting up comerr-dev (2.1-1.43.3-1~bpo8+1) ...
Setting up krb5-multidev (1.12.1+dfsg-19+deb8u2) ...
Setting up libavutil-dev (6:11.9-1~deb8u1+rpi1) ...
Setting up libavresample-dev (6:11.9-1~deb8u1+rpi1) ...
Setting up libmysqlclient-dev (5.5.55-0+deb8u1) ...
Setting up libssl-doc (1.0.1t-1+deb8u6) ...
Setting up libssl-dev:armhf (1.0.1t-1+deb8u6) ...
Setting up libpq-dev (9.4.12-0+deb8u1) ...
Setting up libc6-dbg:armhf (2.19-18+deb8u10) ...
Processing triggers for libc-bin (2.19-18+deb8u4) ...
[email protected]:~/src/listener-2.2 08:40 $

Posts: 1
Joined: Mon Jun 11, 2018 11:37 pm

Re: dpkg returned an error code (1)

Mon Jun 18, 2018 11:30 am

I got the exact same issue while setting up my ssh server and using terminal multiplexer to install a few things. This is the code I got:

Code: Select all

Error: missing `server' JVM at `/usr/lib/jvm/java-8-openjdk-armhf/jre/lib/arm/server/libjvm.so'.
Please install or use the JRE or JDK that contains these missing components.
E: /etc/ca-certificates/update.d/jks-keystore exited with code 1.
Processing triggers for systemd (232-25+deb9u2) ...
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

Return to “Raspbian”