travis-ci / travis-ci

Free continuous integration platform for GitHub projects.
https://travis-ci.org
8.42k stars 720 forks source link

Can't install python-zmq #3106

Closed remram44 closed 6 years ago

remram44 commented 9 years ago

Installing python-zmq via aptitude yields:

...
Selecting previously unselected package libzmq1.
Unpacking libzmq1 (from .../libzmq1_3.2.2-0~travis1_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/libzmq1_3.2.2-0~travis1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libzmq.so.3.0.0', which is also in package libzmq3 3.2.2+dfsg-1~travis1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
...
Errors were encountered while processing:
 /var/cache/apt/archives/libzmq1_3.2.2-0~travis1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

https://travis-ci.org/VisTrails/VisTrails/jobs/46761015#L310

Related: #982?

BanzaiMan commented 9 years ago

Why are you getting libzmq1_3.2.2? It should be 2.1.11 on Precise. http://packages.ubuntu.com/precise/libzmq1

Seems like some dependency resolution is broken for precise. See https://travis-ci.org/VisTrails/VisTrails/jobs/46761015#L115-L117

dpkg: error processing /var/cache/apt/archives/libzmq1_3.2.2-0~travis1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libzmq.so.3.0.0', which is also in package libzmq3 3.2.2+dfsg-1~travis1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
remram44 commented 9 years ago

Precise doesn't have a package libzmq3, so this really looks specific to Travis.

BanzaiMan commented 9 years ago

Does this package dependency resolution error happen on any Precise machine? (My short experiment confirms it does.) If so, this is an issue with Ubuntu itself.

remram44 commented 9 years ago

Precise doesn't have a libzmq3 package. The ~travis in package versions are a sign that some tampering was done here...

BanzaiMan commented 9 years ago

Ah. You're right. Sorry about that. We'll take a look.

BanzaiMan commented 9 years ago

(Remotely related: https://github.com/travis-ci/travis-ci/issues/2558)

subnetmarco commented 9 years ago

I'm experiencing the same error.

BanzaiMan commented 9 years ago

Before reinstalling libzmq3, try removing the file: /etc/apt/sources.list.d/travis_ci_zeromq3-source.list.

htgoebel commented 9 years ago

Adding sudo rm -f /etc/apt/sources.list.d/travis_ci_zeromq3-source.list just in front of sudo apt-get install -y python-zmq solved the problem for me. See e.g. https://travis-ci.org/htgoebel/pyinstaller/builds/61910151

geertw commented 9 years ago

This issue is still occurring and is becoming more problematic when moving to Docker build machines. For now, I've worked around the problem by install pyzmq using pip, but this takes more build time than it should and it's counterintuitive.

This travis.yml snippet does not work in Docker builds:

addons:
  apt:
    packages:
   - python-zmq

as this returns the following error:

Unpacking libzmq1 (from .../libzmq1_3.2.2-0~travis1_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/libzmq1_3.2.2-0~travis1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libzmq.so.3.0.0', which is also in package libzmq3 3.2.2+dfsg-1~travis1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)

See this build for an example.

This does work for me:

install:
  - pip install pyzmq
remram44 commented 9 years ago

@BanzaiMan did you take a look yet? It's been 9 months...

BanzaiMan commented 8 years ago

I reverted the source removal.

remram44 commented 8 years ago

Still getting the same error.

dpkg: error processing /var/cache/apt/archives/libzmq1_3.2.2-0~travis1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libzmq.so.3.0.0', which is also in package libzmq3 3.2.2+dfsg-1~travis1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
...
Errors were encountered while processing:
 /var/cache/apt/archives/libzmq1_3.2.2-0~travis1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
stale[bot] commented 6 years ago

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues

remram44 commented 6 years ago

Seems to work now. libzmq3_4.0.4+dfsg-2_amd64.deb was installed, so whatever Travis hack was there has been removed since.