Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am running xubuntu 12.1, and am having some difficulty getting a program I have added to my path to execute.

The program I am attempting to execute is scan-view, from Clang. I built Clang from source, and as recommended, added scan-build and scan-view to my PATH.

echo $PATH gives me:

/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/paul/clang_build/Debug+Asserts/bin:/home/paul/llvm/tools/clang/tools/scan-build:/home/paul/llvm/tools/clang/tools/scan-view

Which is what I expect. clang and scan-build both work fine, but when I try scan-view from the shell, I get:

The program 'scan-view' is currently not installed. You can install it by typing:
sudo apt-get install clang

However, giving a complete path to scan-view opens it:

/home/paul/llvm/tools/clang/tools/scan-view/scan-view

I'm sure I'm making a silly mistake, but have tried everything I can think of.

Update: I am still having the same issue. Not sure if it's relevant, but I noticed scan-build, which is working, is a ruby script, while scan-view is a python script. I'm not sure if that makes a difference.

share|improve this question
    
Did you restart your terminal after adding the path to $PATH? –  Jobin Mar 13 '13 at 3:35
    
@Jobin Yes, I have restarted several times since making the modification the path, and the problem persists. –  Paul Spinelli Mar 13 '13 at 4:01
add comment

2 Answers

Did you verify that the resulting binary/script is flagged as executeable?

chmod 755 SOMEFILE or chmod +x SOMEFILE

an example listing for validation sake:

ls -al $HOME/bin/juju-recycle-local

-rwxr-xr-x 1 charles charles 562 Jan 17 18:00 /home/charles/bin/juju-recycle-local
share|improve this answer
add comment

you should be only adding the path to where the bins are located not the full path

try

export PATH="/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/paul/clang_build/Debug+Asserts/bin:/home/paul/llvm/tools/clang/tools"

im not sure why scan-build works. can you post the output of whereis scan-build

share|improve this answer
    
The bin paths are actually /home/paul/llvm/tools/clang/tools/scan-view and /home/paul/llvm/tools/clang/tools/scan-build. The executable run for scan-build is at /home/paul/llvm/tools/clang/tools/scan-build/scan-build. –  Paul Spinelli Mar 13 '13 at 13:31
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.