May I ask for a little help with setting up phantomjs on a shared hosting server, please?
Let me run through what I have done and then ask my question.
Steps taken...
Used ‘Putty’ to check the architecture of my server, like so …
uname –m // x86_64
cat /etc/issue // Debian GNU/Linux 6.0 \n \l
I downloaded the 64bit version of ‘phantomjs-1.9.8-linux-x86_64.tar.bz2’ from this page https://bitbucket.org/ariya/phantomjs/downloads
Placed that file in a folder on my server and ran the next command in Putty …
tar -jxvf phantomjs-1.9.8-linux-x86_64.tar.bz2
The files extracted and created a directory structure, seemingly without errors. I changed to that that directory and ran ls. The phantomjs file was the only file listed.
I inspected the file with Putty …
file phantomjs
Which returned
ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
Entering
echo "$PWD/phantomjs"
Gives me
/homepages/24/someNumber/htdocs/cabs/mySite/phantom/bin/phantomjs
Next I tried
/homepages/24/someNumber/htdocs/cabs/mySite/phantom/bin/phantomjs -–version
The result of which was the 'No such file or directory' error ...
-bash: /homepages/24/someNumber/htdocs/cabs/mySite/phantom/bin/: No such file or directory
However, if I just enter
/homepages/24/someNumber/htdocs/cabs/mySite/phantom/bin/
then I get
/homepages/24/someNumber/htdocs/cabs/mySite/phantom/bin/: Is a directory
May a linux novice ask for some pointers on where I have gone wrong. The readme file mentions being up and running in 5 minutes. So, I have that dreadful feeling I have missed something rather basic.
Thank you.
EDIT
permissions in the phantom directory
-rwxrwxrwx 1 u387xx ftpusers 38346752 Oct 24 2014 phantomjs
permissions in the
/homepages/24/someNumber/htdocs/cabs/mySite directory (specifically for the phantom folder)
drwxr-xr-x 7 u387xx ftpusers 4096 Jul 13 11:35 phantom
Edit
In Putty, whilst in the phantom/bin directory, if I run ~/phantomjs
**/aHigherUpFolder**/homepages/24/someNumber/htdocs/phantomjs: No such file or directory
Interesting as there is another directory further up the path now. However, trying ...
/aHigherUpFolder/homepages/24/someNumber/htdocs/cabs/mySite/phantom/bin/phantomjs --version
Still leads me to a 'No such file ...' message.
I had this exact problem in reverse. I accidentally downloaded the 32 bit build for a 64 bit box. The underlying issue is discussed here:
https://askubuntu.com/questions/454253/how-to-run-32-bit-app-in-ubuntu-64-bit
Basically, it's just a bad error message for a binary that's missing some essential libraries.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With