- This topic has 54 replies, 14 voices, and was last updated 7 years ago by Cougar.
-
Linux help s'il vous plait. Installing multiple versions of packages.
-
CougarFull Member
At work our network bods use iperf to test the performance of new installs. To this end, I’ve built a Lubuntu desktop-on-a-stick USB key as it doesn’t work reliably on Windows.
Iperf comes in two flavours, “iperf” which is actually iperf v2, and “iperf3” which is, unsurprisingly, iperf v3. Iperf3 is a complete rewrite of iperf and the two are incompatible.
I’ve installed iperf3 onto the pendrive image (compiled from source as there’s a showstopping bug in the released binaries), but we have a need to use both the old iperf and the new iperf3 whilst we transition from old to new.
The problem is, even though they’re differently named, installing one removes the other. Is there any way I can get both of these packages installed concurrently?
Cheers.
CougarFull MemberAs an aside, for regular readers, this was the endgoal from my earlier thread:
http://singletrackworld.com/forum/topic/building-a-custom-linux-live-usbcodybrennanFree MemberOoh, I like iperf……don’t suppose they install into user space solely?
In which case, would creating a separate user, logging into that, install either/or version, do the job?
What I quite liked about the Win version was that there was no need to install; just a binary.
CougarFull MemberI did wonder about that, whether it could install into /usr or something, but it’s beyond my knowledge (to be fair though, when I started this it was all beyond my knowledge, I’ve learned quite a bit in the seven months since I started this project).
Windows does something creative with the network connection I’m told, some sort of “optimisation” or other which skews the results. Exactly what that is I don’t know, I’ve not looked into it. Maybe it’s something that can be tweaked in the adapter settings, but I don’t know (or want to know) enough about iperf to be able to troubleshoot it further. I know more about Windows but less about networking than most of our network engineers so I’ve (unusually) taken what they’ve told me at face value for once.
codybrennanFree MemberI’ve used it on W2K clients, XP clients…..no problems that I’ve found. ‘Optimisation’, they tell you? Odd. I think that there may be a strange windowing/buffering thing going on in 7….not too sure TBH.
I’ve been trying to find out the dependencies and install paths for the Ubuntu/Deb package for you, still looking.
rossburtonFree MemberIf you’re building the packages yourself I’d suggest changing the prefix for each build so they don’t trample each other: into /opt/iperf2 and /opt/iperf3 instead of /usr.
CougarFull Member‘Optimisation’, they tell you? Odd. I think that there may be a strange windowing/buffering thing going on in 7….not too sure TBH.
Could be that. I don’t know to be honest, my default is to question everything I’m told as “fact” by other engineers, but I couldn’t be bothered to argue with this one.
If you’re building the packages yourself I’d suggest changing the prefix for each build so they don’t trample each other: into /opt/iperf2 and /opt/iperf3 instead of /usr.
At what point do you do that? This is the first time I’ve ever done anything like this.
The procedure I’ve been following is to unpack the tarball, run
configure
thenmake
, then usecheckinstall
to spit out a .deb package, but I don’t really understand what each step really does beyond blindly following instructions on the Internet.As far as I can see, configure seems to be applying platform-specific settings, then make actually compiles the code. Is it a setting within make or do I need to start hacking the text files in the original tarball first? Or am I talking pish?
TheBrickFree MemberI was just going to say look at the options for configure. Allows you to put prefix and specify install location.
TheBrickFree MemberConfigure is part of autoconf it writes your make file
https://www.gnu.org/software/autoconf/manual/autoconf.html#TopNever used it as a developer only as a end user.
CougarFull MemberRight. Ripped out all the previous versions. Installed iperf from the repository, then installed iperf3 from the freshly configured .deb. Now I’m getting,
# iperf bash: /usr/bin/iperf: No such file or directory # iperf3 bash: /usr/local/bin/iperf: No such file or directory
CougarFull MemberThe .deb has installed correctly into
/opt/iperf3
it seems, so presumably I could fix that with an alias though that feels clunky to me.Interestingly,
apt-get remove iperf
removes my custom iperf3 package, not the original iperf, so presumably it’s still thinking that it’s an upgrade of iperf 2 rather than a separate thing.aracerFree Member…and what do you get for that with a clean install of either
Also what happens if you re-install iperf?
CougarFull MemberInstall iperf from repository with
apt-get install
:# which iperf /usr/bin/iperf
(which iperf3 returns nothing, which is what I expected.)
Next, dpkg -i
iperf_3.1.3.M-1_amd64.deb
Both
which iperf
andwhich iperf3
now return nothing.aracerFree MemberSo is /usr/bin/iperf still there after installing the deb? And where is the iperf3 binary installing to?
BTW what tags are you using to get your code blocks a different shade, “
" doesn't see to do that
CougarFull MemberFrom /opt/iperf3? Very curious.
Yes.
Also what happens if you re-install iperf?
If I install the .deb and then apt-get iperf, it tells me iperf is already the newest version (3.1.3.M-1).
The ‘M’ is there because I was prompted to enter a version number by, uh, checkinstall I think, I gave it 3.1.3.M so I could readily tell it apart from the official 3.1.3 binaries.
aracerFree MemberAh, you’re screwed then 🙂
I’m thinking there’s some force option with apt-get though…
wzzzzFree MemberCan you use Docker and just have different containers for each version?
aracerFree Member…OK so I’ve plugged in an RPi as it’s the easiest way for me to get debian running (I suspect instructions for Fedora might not help much!)
Try: dpkg –listfiles iperf
(worth trying before and after installing iperf3, and for iperf3)
CougarFull MemberSo is /usr/bin/iperf still there after installing the deb? And where is the iperf3 binary installing to?
No.
The /opt folder.There’s something funky going on here. I just spotted, installing the .deb says,
Unpacking iperf (3.1.3.M-1) over (2.0.5+dfsgl-2) ...
This is the crux I think, it thinks it’s the same thing.The thing is, I’m 99% sure I didn’t have this problem with the official binaries. I could have the repository and an official .deb of iperf3 running concurrently. Though I’ve just installed iperf3 and iperf from the repositories,
which
reports /usr/bin/iperf and /usr/bin/iperf3 respectively, but typing iperf3 to run it fails as it’s now looking in /usr/local/bin/iperf3… 😯I’ve clearly bollocksed something here with repeatedly remaking / reinstalling. I think what I might do here is rip out the source code directory and start again from scratch with a fresh copy of the source.
chvckFree MemberI’ve not used iperf but can you not just use make install instead of creating a .deb (I’m assuming there’s a makefile…)? Ok you won’t be able to use a package manager to manage it but if you set the prefix for each then it should install both. You might have to softlink the binary one of them under a different alias though?
CougarFull MemberI’ve not used iperf but can you not just use make install instead of creating a .deb
That’s what I did originally. The problem is, I need to roll this out to two dozen engineers. It’s a lot simpler to say “run the attached file on this email” than it is to have them all download a 5Gb disk image of the entire pendrive every time I make a minor change.
Plus, make install seemed… messy.
CougarFull MemberAnyway, I’m going home, I’ll pick this up in the morning. Thanks for your help this far guys.
oldnpastitFull MemberGet rid of everything that debian might have gone and put there.
sudo apt-get install iperf- iperf3- iperf2-
At this point
which iperf
should report nothing.
Now grab the actual source code, and build that via configure in the time-honoured fashion.
tar xvf iperf-x.y.z.tar.gz cd iperf-x.y.z ./configure --prefix=/opt/whatever make -j sudo make install
aracerFree MemberHang on, just remembered something from building PXE boot systems. Create a completely separate file structure and chroot into it. Much easier than debugging the deb!
CougarFull MemberIs that something they’ll have to do each time they want to switch between?
Our engineers are of varying ability outside of their field. Having to switch between filesystems would be unworkable I think.
make -j
What’s -j ?
sudo make install
I don’t really want to be venturing outside of the package manager for portability / compatibility / simplicity if I can help it.
nicknameFree Member-j = multicore support, so can be used to speed up compilations, although it’s really easy to kill a box when you give it a large value 😉
Solutions such as Docker (or Vagrant) are nice – essentially mean you don’t have to care so much about portability, and would provide an easy way to spin up isolated environments. There is some overhead though, but probably wouldn’t make much difference (at least if you use these environments to run both iperf / iperf3 tests).
They might be overkill though – if the release binaries aren’t available, you could try building from source statically, but you said you wanted to make use of the package manager, so that doesn’t really work.
I’m not sure if debian has something like Centos SCL, which are basically different repositories (which means you can often install different versions of packages alongside each other).
nicknameFree MemberNote, if you do go down the docker route, you can benefit from a ton of pre-created images, of which iperf already exists:
https://hub.docker.com/r/networkstatic/iperf3/
https://hub.docker.com/r/mlabbe/iperf/ (based on alpine, so super lightweight)oldnpastitFull MemberThe problem is, even though they’re differently named, installing one removes the other. Is there any way I can get both of these packages installed concurrently?
On Debian at least:
$ apt-get install iperf iperf3 $ iperf -v iperf version 2.0.9 (1 June 2016) pthreads $ iperf3 -v iperf 3.1.3 Optional features available: CPU affinity setting, IPv6 flow label, TCP congestion algorithm setting, sendfile / zerocopy, socket pacing
CougarFull MemberAnd that’s how it used to work, however from my OP,
compiled from source as there’s a showstopping bug in the released binaries
I can’t use the repositories for iperf3 and there’s something nobby about the iper3 source (or my naive compilation) which makes iperf3 identify as iperf rather than iperf3.
CougarFull MemberAlso,
What repositories are you getting those from? They’re both newer than the ones I’m getting from the default Lubuntu repos (not that that fixes the bug issue).
pedalonFree MemberCould you just send them a shell script to install the .deb packages from the iperf website?
Just tested this on Ubuntu 14.04 and seems to work ok and co-exist happily.
These are the steps from the developer site to install a newer version than is in the repos:
sudo apt-get remove iperf3 libiperf0
wget https://iperf.fr/download/ubuntu/libiperf0_3.1.3-1_amd64.deb
wget https://iperf.fr/download/ubuntu/iperf3_3.1.3-1_amd64.deb
sudo dpkg -i libiperf0_3.1.3-1_amd64.deb iperf3_3.1.3-1_amd64.deb
rm libiperf0_3.1.3-1_amd64.deb iperf3_3.1.3-1_amd64.deb
Then install iperf2 in the same way:
wget https://iperf.fr/download/ubuntu/iperf_2.0.5+dfsg1-2_amd64.deb
sudo dpkg -i iperf_2.0.5+dfsg1-2_amd64.deb
rm iperf_2.0.5+dfsg1-2_amd64.deb
Wrap that all up in a shell script and should be a goodun. You’ll need to re-issue it when it gets updated, but better than building from source I reckon.
chambordFree MemberWhat version of Lubuntu is it? You should be able to find a PPA which will sort you out with a newer version through apt-get.
EDIT: Or, have you enabled backports?
CougarFull MemberCould you just send them a shell script to install the .deb packages from the iperf website?
No, because as I said in the OP I need to correct a bug present in the released binaries, which is why I’m having to compile from source.
What version of Lubuntu is it? You should be able to find a PPA which will sort you out with a newer version through apt-get.
EDIT: Or, have you enabled backports?
16.04 LTS. I don’t know what a PPA or a backport is, but see my previous reply.
oldnpastitFull MemberI just built the iperf3 debian package from source and it duly puts it in the right place:
pi@raspberrypi:~/iperf3 $ dpkg-deb --fsys-tarfile iperf3_3.0.7-1_armhf.deb|\ tar tvf - drwxr-xr-x root/root 0 2016-11-02 10:04 ./ drwxr-xr-x root/root 0 2016-11-02 10:03 ./usr/ drwxr-xr-x root/root 0 2016-11-02 10:04 ./usr/bin/ -rwxr-xr-x root/root 5568 2016-11-02 10:04 ./usr/bin/iperf3
This is on debian rather than ubutnu. But at least on debian, I think building from source should be fine. Unless there’s something else I’ve missed.
CougarFull MemberThe more I think about this, the more I’m convinced that the issue is that the source I’m using is going “hi, I’m iperf” rather than “hi, I’m iperf3.” How I’d go about changing that, I don’t have a scooby.
On the github there’s a few forks; there’s “3.1 STABLE” and “master.” Master appeared to be the newest / development version and so that’s what I was using (though github is something else that frankly baffles me so who knows), but I’m wondering if there’s some sort of weirdness going on with the versioning precisely because it’s not a release version of the code. I think what I’m going to do is bin everything off, grab a new copy of 3.1 STABLE and start again using that.
Thanks for the help so far folks.
The topic ‘Linux help s'il vous plait. Installing multiple versions of packages.’ is closed to new replies.