Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to create a symbolic link on Ubuntu 10.04 it says:

me@laptop:~/PHPUnit$ ls
assertions.php      LICENSE      PHPUnit           README.markdown
build.xml           package.xml  phpunit.bat       Tests
ChangeLog.markdown  phpunit      phpunit.xml.dist
me@laptop:~/PHPUnit$ ln -s phpunit /usr/bin/phpunit
ln: accessing `/usr/bin/phpunit': Too many levels of symbolic links

And when I do /usr/bin$ ls php* I just get:

php  php5  php-config  php-config5  phpize  phpize5

I tried to create it before, and I'm not sure if I run a wrong command..

share|improve this question
    
try to specify the full path of phpunit – Heisenbug Aug 12 '11 at 11:45

Beware that using ln -s target /path/symlink, the target will be interpreted as relative to the path directory (where the symlink will belong). Your command would create a symlink that points to itself. Hence, a path lookup loop would occur every time the symlink is accessed.

In your case, maybe /usr/bin/phpunit already exists and is self-looping. Remove it first and change your command to:

me@laptop:~/PHPUnit$ ln -s ~/PHPUnit/phpunit /usr/bin/phpunit

(Using an absolute target is probably the best here)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .