0

I have a program (iperf 2.0.5) in Fedora Linux. I want to run another package of the same newer version of the program (iperf 3.0.3) only restricted / executable local to that folder.

So the default iperf on my PC would be 2.0.5 , but if i want to use iperf 3.0.3 in a designated folder ( similar to what we do in windows ) . We have two execuatble in two different folders and on our preference we run the executable from the folder loaction.

I did download the package from RPM resoure iperf, and it shows the exact specs.

What i have already tried.

./Configure;make;make install iperf # Did not work.

rpm --prefix=/root/Iperf3.0.3/ iperf3.0.0*.rpm. # Indicating that cannot use prefix for package that is already installed.

yum install iperf out of the question because it will make it the default executable.

Thanks Bharat C P

  • You *might* be able to use `rpm --prefix=.... -i iperf3.0.0*.rpm` but I don't know if that will work (and to some extent it depends on whether those packages relocatable I think). What didn't work about compiling it manually? – Etan Reisner Feb 11 '15 at 20:27
  • Etan, I am experiencing the following errors. [root@dhcp IPERF]# rpm --prefix=/root/iperf 3.0.3/ iperf3-3.0-0.3.b4.fc19.x86_64*.rpm rpm: --prefix may only be used when installing new packages, i want to keep both the packages, can you let me know how we can do that. – Bharat C Penumutchu Feb 11 '15 at 20:42
  • You missed the `-i` flag I used in my command. Without it you aren't telling rpm to do anything. – Etan Reisner Feb 11 '15 at 20:43
  • Etan, i took your suggestion and i am getting a non relocatble error.[root@dhcp-v36-062 iperf3]# rpm -i --prefix=/root/iperf3/ iperf3-3.0-0.3.b4.fc19.x86_64*.rpm rpm: --prefix may only be used when installing new packages warning: iperf3-3.0-0.3.b4.fc19.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fb4b18e6: NOKEY error: package iperf3 is not relocatable – Bharat C Penumutchu Feb 11 '15 at 20:59
  • Like I said then. So we are back to what didn't work compiling it manually? – Etan Reisner Feb 11 '15 at 21:05
  • You could consider creating a `chroot` environment or even a Docker container (though the latter might affect your `iperf` measurements) – Dima Chubarov Feb 12 '15 at 07:06

1 Answers1

0

You can only use --prefix for a rpm package if the package is relocatable.

Here you can find more information on how to determine if a package is relocatable.

However when you're installing code from source, you usually can specify --prefix:

./configure --prefix=/opt/iperf && make && make install
Tiago Lopo
  • 7,619
  • 1
  • 30
  • 51