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:
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!
حسنًا لقد وجدت حلاً ، لقد غيرت البرنامج النصي الخاص بي إلى هذا وهو يعمل بشكل جيد. ليس لدي أي فكرة عن سبب إصلاح هذا لمشكلتي ...
#!/bin/bash
# bash strict and verbose mode
set -o pipefail -e -u -x
if [ ! -z `which p4` ]; then
exit 0
fi
# Installs Perforce
echo "deb http://package.perforce.com/apt/ubuntu/ trusty release" > /etc/apt/sources.list.d/perforce.list
wget -qO - https://package.perforce.com/perforce.pubkey | apt-key add -
apt-get update
apt-get install -y helix-cli
Непонятное «нет такого файла или каталога», скорее всего, на самом деле относится к тому динамическому компоновщику, который пытается вызвать этот (несоответствующий!) Двоичный файл.