Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have some commands places in ~/.local/bin, and correctly added it to the path:

$ echo $PATH
~/.local/bin:~/.gem/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/vendor_perl:/usr/bin/core_perl
$ ls ~/.local/bin
dul-daemon        ipcluster      iptest       ...
$ type -a pelican
pelican is /home/juanlu/.local/bin/pelican

but even though I can place this lines in a GNU make recipe, it eventually fails to execute the command:

$ cat Makefile 
fail:
    @echo $$PATH
    @compgen -c | grep pelican
    @pelican --help
$ make fail
~/.local/bin:~/.gem/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/vendor_perl:/usr/bin/core_perl
pelican-import
pelican-themes
pelican-quickstart
pelican
make: pelican: Command not found
make: *** [fail] Error 127

I have tried to find the solution elsewhere but I don't even find a way to write a search query to put in Google that returns something meaningful.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

The problem is that your $PATH contains the literal ~ instead of the real path. The ~/... syntax is something specific to the shell; it is not expanded by glibc's execvp() function, for example.

Use absolute paths, as in PATH="$HOME/.local/bin:$HOME/.gem/ruby/1.9.1/bin:$PATH

share|improve this answer
    
That was exactly the problem. Thank you very much! –  Juanlu001 Jan 13 '13 at 11:40

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.