Closed SvenMeyer closed 5 years ago
Can confirm this happens on Linux Mint 18.1
I think I have found a workaround (although it would be better if this would not be necessary):
using ubuntu synaptic package manager:
Yes, you'll need to uninstall swarm
. It was moved into a different package to avoid a name clash. CC @nonsense, please correct me if I'm wrong.
@SvenMeyer , you need to uninstall swarm
. You cannot have both ethereum-swarm
and swarm
installed, as they are conflicting, and using the same name for their binaries.
Just as a side note, the swarm
package has nothing to do with Ethereum or the Ethereum Swarm project.
@SvenMeyer @kenshyx to give a bit more background, before we started using ethereum-swarm
, we were using the swarm
debian package name. This was especially problematic, due to the existence of another swarm
debian package:
swarm - robust and fast clustering method for amplicon-based studies
This package has a version higher than the swarm
package distributed with ethereum
- 2.1.6, therefore the package manager prefers it. This is what got installed on your machines, even though it has nothing to do with ethereum
. We rename our package from swarm
to ethereum-swarm
to fix this.
@karalabe regarding the conflicting swarm uninstall, do you recommend a manual or automated uninstall? if manual, what files/directories need to be purged besides the swarm file in /usr/bin? I renamed the file to swarmXXXX to see if that was enough, but it wasn't.
Why name the binary as swarm
when there is a known conflicting binary? In case you really want to keep swarm
as the official name, there should be at least a build option to config it's name such that the Debian package (or any other distro that distributes swarm
) can install it with a different name.
@tenfinney an automated uninstall is recommended, for example apt-get purge swarm
. Note that this will remove swarm
, so if you are actually using the swarm - robust and fast clustering method for amplicon-based studies
, you need a different solution.
@andyli we considered renaming the binary and decided against it. There are many debian packages that are conflicting, and this is not a good enough reason to rename the project or the binary.
unfortunately it wont purge the conflicting files and it wants to install the ethereum-swarm 3.1 build but can't install the dependencies. I am caught in a loop. I think my best bet is to do a clean Ubuntu install on AWS (Xenial is most current they offer), and then purge conflicting Swarm first, before I try to install proper Swarm from the PPA. Does that sound like a good avenue?
root@ip-172-31-28-13:/usr/bin# sudo apt-get --purge remove swarm
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
ethereum : Depends: ethereum-swarm but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
root@ip-172-31-28-13:/usr/bin# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
ethereum-swarm
The following NEW packages will be installed:
ethereum-swarm
0 upgraded, 1 newly installed, 0 to remove and 43 not upgraded.
1 not fully installed or removed.
Need to get 0 B/5,560 kB of archives.
After this operation, 22.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 88185 files and directories currently installed.)
Preparing to unpack .../ethereum-swarm_0.3.1+build14601+xenial_amd64.deb ...
Unpacking ethereum-swarm (0.3.1+build14601+xenial) ...
dpkg: error processing archive /var/cache/apt/archives/ethereum-swarm_0.3.1+build14601+xenial_amd64.deb (--unpack):
trying to overwrite '/usr/bin/swarm', which is also in package swarm 2.1.6-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/ethereum-swarm_0.3.1+build14601+xenial_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@ip-172-31-28-13:/usr/bin#
@nonsense As I suggested, you can keep swarm
as the canonical name but let the ethereum-swarm Debian package install it with another name, say ethereum-swarm
.
@tenfinney you are having trouble removing swarm
, because you couldn't complete the installation of ethereum
, and now apt
complains about unmet dependencies.
The way to solve it would be:
apt-get --purge remove ethereum
apt-get --purge remove swarm
apt-get install ethereum
@nonsense thanks! it worked!!
Since swarm
is a very generic name and could cause confusion for other software as well, could we prevent future issues by adding the option to simply create a "name-spaced" package, such as ethereum-swarm
? Or swarm-ethereum
as it seems to be the naming convention used for repos in this project?
@nmolinski there are a number of projects called Swarm or have the word swarm
as part of their name - I can think of Docker Swarm, https://swarm.fund/, https://swarm.city/, and https://github.com/torognes/swarm among others.
We discussed renaming our binary from swarm
to something else and decided against it - there are many projects that are distributed through Ubuntu PPA, that conflict with each other.
If you wish to use https://github.com/torognes/swarm (apt-get install swarm), then you would have to find another way to install our project, because these two project binaries conflict - for example download the binary from http://swarm.ethereum.org/ and rename it and place it anywhere on your PATH.
If you are not using https://github.com/torognes/swarm, then you can uninstall it, and apt-get install ethereum-swarm.
However I agree that we have to add a conflict within the Debian Control file in order to signal to the user that ethereum-swarm and swarm conflict with each other.
We discussed renaming our binary from swarm to something else and decided against it - there are many projects that are distributed through Ubuntu PPA, that conflict with each other.
I'm wondering, what was the argument for not-changing it? It most probably was not "The problem that would be solved is a problem that a lot of projects have with each other", and as the package is also named ethereum-swarm
, i guess it wouldnt be unexpected to ship the script under the same name?
We figured we are not the only package that has conflicts with other packages (for example apt-get install iputils-ping inetutils-ping
).
Furthermore you probably don't really use swarm
and rather had it installed due to a bug in the packaging of ethereum
debian package.
I understand it wouldn't be the only package that conflicts, however why propagate the behaviour?
I would assume swarm
will not be the last product ethereum puts out that could have a cool, but also can be considered generic name. As a developer as well, typing ethereum-swarm
gives me insight and confidence into what I am about to invoke on the command-line. Can't tell you how annoying visual studio code is naming itself code
.
Since ethereum is aiming to revolutionize computing as we know it, it could be projected that all of your products would be installed on many systems; adopting a robust naming convention now would help go a long way.
@nonsense
We discussed renaming our binary from swarm to something else and decided against it - there are many projects that are distributed through Ubuntu PPA, that conflict with each other.
We figured we are not the only package that has conflicts with other packages (for example apt-get install iputils-ping inetutils-ping).
In my opinion, it's not reasonable to say "It's anyway OK, because others do the same things.". Is it okay intentionally not to be as good as possible just because other projects don't? That is unnecessarily conservative attitude.
We figured we are not the only package that has conflicts with other packages (for example apt-get install iputils-ping inetutils-ping).
It is reasonable for iputils-ping
and inetutils-ping
to install a binary with the same name, ping
, that does the same thing. So, one can choose to use either of them but rarely need both.
It is definitely not the case with swarm
and ethereum-swarm
. There is no good justification why a user should install only one of them.
@andyli @nmolinski @jjangga0214 the Issues page on Github is not the place to discuss such changes. Feel free to start this conversation in the Gitter channel to involve more people from the team and reach a consensus, as explained in the Contributions section.
Bottom line for the current situation: If you want to install swarm
and ethereum-swarm
from apt
today, this is expected behaviour and won't work. If you want to use both projects, you have to install them manually (or just one through apt
) and rename the binaries as you please. Swarm has been around for a long time, and we don't feel comfortable changing the name as of now.
For those who don't want to uninstall/reinstall Ethereum, the following worked on my machine:
dpkg -r --force-depends swarm
apt-get install ethereum-swarm
Closing this as the resolution to the original stated problem has been listed above
System information
Geth version: 1.8.12-stable OS & Version: Ubuntu 16.04 / Linux Mint 18.3 & Lubuntu 18.04
Expected behaviour
install geth 1.8.13-stable + ethereum-swarm
Actual behaviour
Ubuntu 16.04 / Linux Mint 18.3 trying to overwrite '/usr/bin/swarm', which is also in package swarm 2.1.6-1
Lubuntu 18.04 Package ethereum-swarm 0.3.1+built14601+bionic trying to overwrite '/usr/bin/swarm', which is also in package swarm 2.2.2+dfsg-1
Steps to reproduce the behaviour
update geth 1.8.12 from ubuntu repo