Dependency-related errors

Hello, I was trying to install Zeek 6.0.3 in Ubuntu 22.04 using binary packages and following the instructions of the official documentation. However, I was unable to conclude the process of installation. After that, I successfully installed Zeek 6.0.3 following the instructions of this blog post, which has instructions for installing from the source. I deleted all files related to Zeek before installing from source.

However, when I try to install other softwares, for instance, I ran sudo apt install autoconf, and i got this response:

Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
You might want to run ‘apt --fix-broken install’ to correct these.
The following packages have unmet dependencies:

  • zeek-6.0-core-dev : Depends: libbroker-6.0-dev (= 6.0.3-0) but it is not going to be installed*
    E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).

When I try to run sudo apt --fix-broken install, I get this response:

Preparing to unpack …/libbroker-6.0-dev_6.0.3-0_amd64.deb …
Unpacking libbroker-6.0-dev (6.0.3-0) …
dpkg: error processing archive /var/cache/apt/archives/libbroker-6
.0-dev_6.0.3-0_amd64.deb (–unpack):

  • trying to overwrite ‘/opt/zeek/include/broker/address.hh’, which *
    is also in package libbroker-lts-dev 6.0.3-0
    dpkg-deb: error: paste subprocess was killed by signal (Broken pip
    e)
    Errors were encountered while processing:
  • /var/cache/apt/archives/libbroker-6.0-dev_6.0.3-0_amd64.deb*
    E: Sub-process /usr/bin/dpkg returned an error code (1)

So, I may be wrong, but it seems that there is a directory error, since the system tries to access /opt/zeek , but the Zeek files are located in /usr/local/zeek.

How could I solve this issue? I would like to try to solve the issue over installing Zeek again from source, since this process can take a really long while. Any help would be greatly appreciated.

Hi,

it seems like you have been trying to install conflicting Zeek packages. You can either install the zeek, zeek-6.0, or the zeek-lts package - but they cannot be installed simultaneously.

Try removing the “libbroker-lts-dev” package, which conflicts with “libbroker-6.0-dev” and then try the apt fixing operation again.

This partially is my fault - this shows that there is insufficient flagging between some conflicting Zeek packages. I will try to add these conflicts to the package - which might make these kind of errors auto-fixable by apt.

I just tried to run sudo apt remove libbroker-lts-dev, still I got the error response:

You might want to run ‘apt --fix-broken install’ to correct these.
The following packages have unmet dependencies:

  • zeek-6.0-core-dev : Depends: libbroker-6.0-dev (= 6.0.3-0) but it is not going to be installed*
    E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).

I also tried to delete manually the files related to libbroker-lts-dev, however the error message persisted.

Did you try apt --fix-broken install again after removing libbroker-lts-dev? :slight_smile:

I did, however the error persisted :sob:

I think that installing Zeek again may not be the sollution, since i was unable to install from binary packages and if I install from source again the error will persist, because is related to the directory which contains Zeek files.

Preparing to unpack …/libbroker-6.0-dev_6.0.3-0_amd64.deb …
Unpacking libbroker-6.0-dev (6.0.3-0) …
dpkg: error processing archive /var/cache/apt/archives/libbroker-6.0-dev_6.0.3-0
_amd64.deb (–unpack):

  • trying to overwrite ‘/opt/zeek/include/broker/address.hh’, which is also in pac*
    kage libbroker-lts-dev 6.0.3-0
    dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
    Errors were encountered while processing:
  • /var/cache/apt/archives/libbroker-6.0-dev_6.0.3-0_amd64.deb*
    E: Sub-process /usr/bin/dpkg returned an error code (1)

This looks very much like libbroker-lts-dev is still installed :).

Could you try removing it again, and perhaps also doing an apt autoremove.

I can also try to update the -lts packages to make this kind of error less likely, but it will take me a couple of days.

The problem is solved! :tada:

I was trying to remove libbroker-lts-dev using the command sudo apt remove libbroker-lts-dev, but the depency-related error persisted, however, I successfully removed the package executing sudo dpkg --remove --force-depends libbroker-lts-dev. Now I am able to install other programs. Thank you for your help!