I have installed p4 command line client on the server, and something strange is happening. It exists, has executable rights, but I cannot execute it because I received an error message that it does not exists.
I tried looking around, and everyone else who had this problem realized they picked the wrong binary for their box, but I made 100% sure I didn't.
the /usr/local/bin/p4 file is:
- 0x0755
- in my $PATH directory (/usr/local/bin)
- exists in the correct place
- execution attempted as root & as ubuntu users
here is my terminal output:
ubuntu@ubuntu:~$ sudo su
+ sudo su
root@ubuntu:/home/ubuntu# wget http://cdist2.perforce.com/perforce/r16.1/bin.freebsd100x86_64/p4
--2017-09-25 22:21:45-- http://cdist2.perforce.com/perforce/r16.1/bin.freebsd100x86_64/p4
Resolving cdist2.perforce.com (cdist2.perforce.com)... 54.192.36.127, 54.192.36.104, 54.192.36.217, ...
Connecting to cdist2.perforce.com (cdist2.perforce.com)|54.192.36.127|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3683848 (3.5M) [application/x-executable]
Saving to: ‘p4’
100%[===================================================================================================================>] 3,683,848 5.06MB/s in 0.7s
2017-09-25 22:21:46 (5.06 MB/s) - ‘p4’ saved [3683848/3683848]
root@ubuntu:/home/ubuntu# chmod +x p4
root@ubuntu:/home/ubuntu# mv p4 /usr/local/bin/
root@ubuntu:/home/ubuntu# p4
bash: /usr/local/bin/p4: No such file or directory
root@ubuntu:/home/ubuntu# ls -lah /usr/local/bin/p4
-rwxr-xr-x 1 root root 3.6M Mar 2 2017 /usr/local/bin/p4
root@ubuntu:/home/ubuntu# file /usr/local/bin/p4
/usr/local/bin/p4: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 10.0 (1000510), stripped
root@ubuntu:/home/ubuntu# uname -m
x86_64
any help is greatly appreciated!
Best Answer
ok I found a solution, I changed my provision script to this and it works fine. I have no idea why this fixed my problem...