Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Having downloaded archives of Sage, Firefox, and Thunderbird from their respective websites on Trisquel 6.0, neither clicking the appropriate shell script nor executing a command to run the programs will open them. Looking at the files' permissions, they are indeed executable.

Edit: Firefox and Thunderbird have now mysteriously started working; Sage, however, remains inoperable. Having downloaded it from the first link on this page, extracted it to my desktop (where Firefox and Thunderbird run just fine), opened the folder in the terminal and run the command "sage" (as there is an executable by that name in the folder) I receive the error: bash: sage: command not found. Yet ls -l shows that the files are known to exist and be executable.

Edit #2: I only thought Firefox and Thunderbird were working. I was actually running the versions I already have installed. Running Firefox and/or Thunderbird with ./[executable] gives the error libxul.so: cannot open shared object file: No such file or directory Couldn't load XPCOM.

share|improve this question
    
Can you provide some links to what you've downloaded? –  slm Jun 12 '13 at 18:04
3  
Try running them from a shell, and see if you get error messages. If so, please paste the errors into the question. –  derobert Jun 12 '13 at 18:09
1  
You may have downloaded them to a partition with the noexec flag set. –  ott-- Jun 12 '13 at 18:40
2  
Do you get any error messages? –  terdon Jun 12 '13 at 19:30
    
Are the downloaded archives for the same architecture as the machine you're running Trisquel on? –  tink Jun 12 '13 at 20:00
add comment

2 Answers

up vote 5 down vote accepted

The first thing to check after extracting a program from an archive is the permissions (chmod a+x ./sage), but if that was the problem, the error message would be “permission denied” and not “command not found”.

Give your description “opened the folder in the terminal and run the command”, it's likely that you ran the command sage expecting to execute the program with this name in the current directory. Unix doesn't work like this: the shell only looks for programs in the directories listed in the PATH environment variable. It doesn't search the current directory implicitly first. To run a program in the current directory, you need to type its path:

./sage

If you want to run the program without specifying a path, you need to install it in a directory in your $PATH (typically /usr/local/bin or ~/bin). It's often convenient to leave the executable with the other files from the application and make a symbolic link to it in a directory in $PATH:

ln -s /path/to/sage-5.9/sage ~/bin/

or if you're already in the directory containing the sage binary:

ln -s $PWD/sage ~/bin/

If you've just added a program to a directory in your PATH and your shell still complains that the command is not found, it may be because you tried before and your shell has kept the “not found” information in a cache. Run hash -r to rebuild the cache and try again. The next time you start a shell, this won't be a problem any more, because the cache isn't saved between runs of the shell.

If you execute a file that is present, with a specified path, and you get the “command not found” error message, it may be because you don't have the right loader. This can happen if you downloaded a binary that is supported by your CPU and kernel but you don't have the required userland support (no libraries). This can also happen if the program is a script whose shebang line refers to an interpreter that isn't present on your system (though typical shells give a “bad interpreter” message rather than “command not found” in this case).

share|improve this answer
    
Fixed with ./sage. –  Lee Sleek Jun 13 '13 at 0:17
    
However, this does not work for Firefox or Thunderbird. I don't think Mozilla even offers 64-bit versions. I'm trying to do this because the version of Firefox I used to post this doesn't update itself, and I hope that the Mozilla build will. –  Lee Sleek Jun 14 '13 at 0:02
1  
@LeeSleek Most 64-bit unices offer 32-bit support as well, you may need to install some extra libraries. –  Gilles Jun 14 '13 at 0:06
add comment

Please check the permission bits on the executables. Also check if the executables are contained in a directory that falls in your PATH.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.