Page MenuHomePhabricator

Arcanist ": No such file or directory" Ubuntu 14.04.1
Closed, InvalidPublic

Description

After performing a fresh installation of the latest arcanist on ubuntu 14.04.1

Ubuntu 14.04.1
Bash 4.3.11(1)-release
PHP 5.5.9-1ubuntu4.5 (cli)
arcanist: c76c5d893e36f1f4b7bba1b00bb4a1b5b38c0c54
libphutil: 04f81f9d9e66ca89e3f2e30a7fdc08739073581e

The path was updated correctly to include ~/arcanist/arcanist/bin.

echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/dev/arcanist/arcanist/bin

Ran the following to ensure proper permissions

sudo chown -R dev:dev ~/arcanist
chmod 755 -R ~/arcanist

The error seen from running "arc" is ": No such file or directory"

The same error is seen when running the script ../scripts/arcanist.php directly.

Event Timeline

mrkanaly assigned this task to epriestley.
mrkanaly raised the priority of this task from to High.
mrkanaly updated the task description. (Show Details)
mrkanaly added a project: Arcanist.
mrkanaly added a subscriber: mrkanaly.
chad raised the priority of this task from High to Needs Triage.

No such file or directory means your system can't find the arcanist binary. That binary is called arc and sits in the arcanist/bin folder. Make sure arcanist and libphutil are installed to the same root folder, not multiple levels deep.

My directory structure is as follows:

~/arcanist/
    arcanist/
    libphutil/

More info about permissions

dev@dev-box:~$ ls -al arcanist/
total 16
drwxr-xr-x  4 dev dev 4096 Jan 31 12:44 .
drwxr-xr-x 21 dev dev 4096 Jan 31 13:03 ..
drwxr-xr-x  8 dev dev 4096 Jan 31 12:43 arcanist
drwxr-xr-x  8 dev dev 4096 Jan 31 12:44 libphutil

I have no other ideas for you, sorry. I am not able to reproduce any issues with my various test installs. Without anything for us to reproduce, there's not much else we can do

https://secure.phabricator.com/book/phabcontrib/article/bug_reports/#unreproducible-problems

Luckily, this is a virtualbox installation. So I can have an appliance packed up here soon.

Here is a link to a folder that contains a virtualbox appliance of the system in question. It is currently uploading, expected to be done in probably 20-30 minutes, as it is 2.5gb.

https://drive.google.com/folderview?id=0B8VO-f8psyQKfjJ2Q1N4cm5welZfOEo1aHVjNHd1LVF5dUVINGxybFN1MkU0ZVhKRnVwTWc&usp=sharing

Sorry, that isn't a level of support we provide (fixing environmental issues).

chad claimed this task.

I just sanity installed a new VM of Ubuntu (14.10 desktop) with no issues. Basic steps to set up in my home directory:

mkdir dev
cd dev
sudo apt-get install git php5 php5-curl
git clone https://github.com/phacility/libphutil.git
git clone https://github.com/phacility/arcanist.git
export PATH="$PATH:/home/chad/dev/arcanist/bin/"
arc help

Basically not much more help we can provide here, as nothing seems wrong with Phabricator. Generally we recommend Google or StackOverflow to help troubleshoot such issues. irc.freenode.net #phabricator is also full of helpful contributors who might have ideas as well.

After messing around a little bit, on all 3 of the other installations of arcanist that I have (that work fine), I am able to invoke arcanist/scripts/arcanist.php just by typing the name of the script. But only on my 14.04.1 box, that doesnt work. However, if I add 'php5' to the beginning of the command it works.

Aha! I found the culprit. Executing the command with bash debugging on, we get this:

dev@cosmo-box:~$ bash --debug arc
/home/dev/dev/arcanist/bin/arc: line 2: $'\r': command not found
/home/dev/dev/arcanist/bin/arc: line 5: $'\r': command not found
/home/dev/dev/arcanist/bin/arc: line 8: $'\r': command not found
/home/dev/dev/arcanist/bin/arc: arc: line 18: syntax error near unexpected token `done'
'home/dev/dev/arcanist/bin/arc: arc: line 18: `done;

Google that and you find that it is because bash is failing to interpret windows line endings in the file. The only reason this happened, is because git config core.autocrlf was set, because I used the same git config file that I have used on ~20 windows machines, because it gets everyone using the same pull/push/rebase settings.

So while I know that I am ultimately the one at fault here, I think this could merit some additions to documentation, that if you have "core.autocrlf true" in your gitconfig when you clone the arcanist repos, arcanist (more specifically its bash wrapper) will not work.

Thanks for your time

I just had the exact same issue. Thanks @mrkanaly.