8

I have built the bitcoin source on my Ubuntu desktop, and have installed the proper libraries via apt-get and building some.

When I do:

cd src
bitcoind -daemon

I get the error:

bitcoind: command not found

and when I do ./bitcoin I get:

bash: ./bitcoin: No such file or directory

What am I doing wrong?

16

Go to the directory with the bitcoind binary.

Make sure it's executable: chmod +x bitcoind

Now run it: ./bitcoind -daemon

5

Also, if you want to just run bitcoind (without ./bitcoind), add it to your executable path:

  1. As Andrew mentioned, first be sure to chmod +x bitcoind in your src directory.
  2. Still in the src directory, run pwd to get the full path (for example /home/alex/src)
  3. Add it to your .profile with echo "export PATH=$PATH:/home/alex/src" >> ~/.profile

Now you can execute bitcoind from anywhere in your system when logged with your user.

0

I put this line in my /home/chris/.bashrc file:

alias bc='/home/chris/src/bitcoin/src/bitcoind'

Then (after starting a new terminal) I can type just bc instead of bitcoind. There's no need to edit your PATH variable if you use an alias like this.

You'll need to change the /home/chris/src/bitcoin/src/bitcoind bit to match the correct location of the bitcoind executable on your system.

It's also OK to do this:

alias bitcoind='/home/chris/src/bitcoin/src/bitcoind'

if you want to type bitcoind out in full to run it. It may look like a recursive definition, but it's fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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