Why cant I execute certain files?
Apologies if this is a silly question, I have done a LOT of searching and fiddling around but cannot find an answer.
Basically I have installed lynx but cannot run it. Please see my latest attempt: /opt/bin # ls -l lynx -rwxr-xr-x 1 root root 1140456 Jan 20 2008 lynx /opt/bin # ./lynx /bin/sh: ./lynx: not found As you can see I can see the lynx file and it looks like I have execute permissions (to my newb eyes), but when I try to run it I get "not found". Thanks in advance for any comments whatsoever, even insults would be welcome at the moment :) Machine: Freecom Network Drive Pro Distro: OpenFSG |
There's no need for ./ and you don't need to be in /opt/bin just type lynx when you start a terminal session.
|
Thanks for the reply, but just tried your suggestion and got the same problem:
/opt/bin $ lynx -sh: lynx: not found |
Based on your command-line output you are logged in as root and have lynx installed in /opt/bin and your lynx is owned by root. All in all it should work.
I had once problems accessing web files by the Apache browser due to some SELinux settings on the directory containing those files, which was solved by copying the files to a new directory and replacing the old directory with the new one. It was a weird solution to a weird problem. In your case it seems easier to install lynx properly in /usr/bin uing some package manager. |
Try executing it from your /home/username directory. Type ~ then press enter, now type lynx. If that doesn't work try /opt/bin/lynx. If both ways fail, it is most likely because /opt/bin is not in your path. Type env and look for a line like this: PATH=/opt/bin.
|
Tried your suggestions.
/home/.users $ ~ -sh: /home/.users/admin: Permission denied Even though /home/.users $ cd /home/.users/admin ~ $ works fine. Also tried suggestion from {BBI}}NEXUS{BBI} to copy to /opt/bin but get the same problem. I reckon a hammer or an axe might be required soon... |
Quote:
So typing just ~ is like typing /home/.users/admin which also isn't a command. So you get "Permission denied " cd is a command. It means change directory to .... so you can cd ~ or cd /home/.users/admin lynx doesn't work because as {BBI}Nexus{BBI} said, /opt/bin/ is not in root's path (and you were trying as the root user) Please read {BBI}Nexus{BBI}'s post #5 again, and try /opt/bin/lynx |
Apologies I misquoted, I meant to say that I had tried salter's suggestion. I have also tried {BBI}Nexus{BBI} too:
/ # /opt/bin/lynx /bin/sh: /opt/bin/lynx: not found |
Just out of curiosity, what is the output of the following two commands?
Code:
file /opt/bin/lynx |
OK
What's the output of Code:
ls -l /opt/bin/lynx (That's "minus Ell" not "minus one") |
Code:
/ # file /opt/bin/lynx Code:
/ # ls -al /opt/bin |
Quote:
In your listing of /opt/bin/ lynx is there, and is executable by all. So it should work. But it doesn't. What, please is the output of env ? Is your filesystem corrupted? have you tried running fsck ? |
Yes, file is missing, cant install it either (get an error). This is an unusual distro.
Code:
/opt/bin # env Code:
/opt/bin # fsck -N |
Oh bllx! Just gave out my ip address. Dont look :)
|
Quote:
|
All times are GMT -5. The time now is 10:28 PM. |