Wie ist das möglich?
bash: /usr/local/phantomjs/bin/phantomjs: No such file or directory
bash-4.3# cd /usr/local/phantomjs/bin
bash-4.3# ls
phantomjs
bash-4.3#
Der Inhalt von /usr/local/phantomjs/binist die phantomjsDatei, aber wenn ich versuche, sie auszuführen, sieht es so aus, als ob sie nicht existiert.
Zu Ihrer Information, ich bin auf Alpine Linux 3.3
Update1
bash-4.3# ls -lF /usr/local/phantomjs/bin/phantomjs
-rwxr-xr-x 1 root root 67932064 Jan 25 2016 /usr/local/phantomjs/bin/phantomjs*
bash-4.3# lf -lF /usr/local/phantomjs/bin
bash: lf: command not found
bash-4.3# ls -lF /usr/local/phantomjs/bin
total 66340
-rwxr-xr-x 1 root root 67932064 Jan 25 2016 phantomjs*
Update2
bash-4.3# file /usr/local/phantomjs/bin/phantomjs
bash: file: command not found
bash-4.3# head -n1 /usr/local/phantomjs/bin/phantomjs
ELF>xvA@`�
Q�t/lib64/ld-linux-x86-64.so.2GNUGNU����!�`�L`�L^|��������h�TT@T@DD`��`�L`�P�tddB�dB�dB��g
Update3
bash-4.3# echo $PATH
/usr/local/phantomjs/bin:/usr/local/ruby/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
bash-4.3# ruby -v
ruby 2.1.10p492 (2016-04-01 revision 54464) [x86_64-linux]
Update4
bash-4.3# strace /usr/local/phantomjs/bin/phantomjs
execve("/usr/local/phantomjs/bin/phantomjs", ["/usr/local/phantomjs/bin/phantom"...], [/* 13 vars */]) = -1 ENOENT (No such file or directory)
writev(2, [{"strace: exec: No such file or di"..., 39}, {"\n", 1}], 2strace: exec: No such file or directory
) = 40
writev(2, [{"", 0}, {NULL, 0}], 2) = 0
getpid() = 12
exit_group(1) = ?
+++ exited with 1 +++
Vielen Dank
ls -lF. Entschuldigung für die Verwirrung! Können wir auch die Ausgabe von file /usr/local/phantomjs/bin/phantomjsbitte sehen, und wenn das etwas wie "Text" oder "Skript" sagt, auch head -n1 /usr/local/phantomjs/bin/phantomjs. Ich habe eine Hypothese, die sie möglicherweise bestätigen oder verfälschen würde (oder uns zumindest in die richtige Richtung weisen würde).
lsaber nicht filesofort verfügbar sind, vermute ich jetzt, dass Ihre $PATHnicht vollständig besiedelt ist. Mal sehen echo $PATH, um das zu bestätigen; Ich vermute, es wird /binaber /usr/binfür den Anfang nicht enthalten. Es ist auch möglich, dass andere Teile Ihrer Umgebung (z. B. $LD_LIBRARY_PATH) aus demselben Grund $PATHunvollständig sind, der zu Unvollständigkeit führt, aber $PATHauf einen Blick leicht zu überprüfen ist. Wenn man sich en.wikipedia.org/wiki/Alpine_Linux ansieht , könnte der Minimalismus der Alpen hier ein Faktor sein.
rubyfunktioniert wie erwartet. Das Problem ist nur mit phantomjs.
ls -lF /usr/local/phantomjs/bin/phantomjssowie sehenlf -lF /usr/local/phantomjs/bin. Bitte bearbeiten .