Author

Topic: Compiling Bitcoin Client (Read 985 times)

legendary
Activity: 1456
Merit: 1081
I may write code in exchange for bitcoins.
May 21, 2015, 10:31:56 AM
#9
That is no problem. I knew what was meant. Thank you tspacepilot for your help.

Bitcoin-qt is now running!  Grin

I have only concerns because of the Berkley DB.  I think that I did not install it correctly (I typed in ./configure --with-incompatible-bdb). I read, that this has some influence on the wallet.dat. I will test that and open a new thread.


You're welcome.  Glad we got to the bottom of it.  I told you it can be very useful to actually cut-n-ptase from the terminal session. Wink
newbie
Activity: 17
Merit: 0
May 21, 2015, 10:26:52 AM
#8
That is no problem. I knew what was meant. Thank you tspacepilot for your help.

Bitcoin-qt is now running!  Grin

I have only concerns because of the Berkley DB.  I think that I did not install it correctly (I typed in ./configure --with-incompatible-bdb). I read, that this has some influence on the wallet.dat. I will test that and open a new thread.
legendary
Activity: 1344
Merit: 1024
Mine at Jonny's Pool
May 21, 2015, 10:21:21 AM
#7
You made bitcoin.conf it ~/bitcoin but bitcoind expects to find it in ~/.bitcoin (notice the leading .).  This is actually typical on UNIX-like systems---programs keep config files in directories or files that start with a . in the user's home dir.  This is because filenames that start with a . are hidden by default so they don't clutter your directory listing.  Anyway, I think if you do this, your problem will be solved:

Code:
$ mkdir ~/.bitcoin
$ mv ~/bitcoin/bitcoin.conf
You missed the second argument to mv Smiley

Code:
mv ~/bitcoin/bitcoin.conf ~/.bitcoin/bitcoin.conf
legendary
Activity: 1456
Merit: 1081
I may write code in exchange for bitcoins.
May 21, 2015, 09:54:17 AM
#6
You made bitcoin.conf it ~/bitcoin but bitcoind expects to find it in ~/.bitcoin (notice the leading .).  This is actually typical on UNIX-like systems---programs keep config files in directories or files that start with a . in the user's home dir.  This is because filenames that start with a . are hidden by default so they don't clutter your directory listing.  Anyway, I think if you do this, your problem will be solved:

Code:
$ mkdir ~/.bitcoin
$ mv ~/bitcoin/bitcoin.conf ~/.bitcoin/bitcoin.conf

EDIT: johnny (below) is correct, I had it incorrectly.  I fixed it so that there'll be less confusion if OP copies-n-pastes the my answer without reading below.  Thanks johnny.
newbie
Activity: 17
Merit: 0
May 21, 2015, 09:50:32 AM
#5
O.k. I get the following outputs (bitcoin-cli shows a path this time, maybe because I restarted the console).

helena@SC:/usr/local/bin$ which bitcoind
/usr/local/bin/bitcoind
helena@SC:/usr/local/bin$ which bitcoin-cli
/usr/local/bin/bitcoin-cli
helena@SC:/usr/local/bin$ bitcoind
Error: To use the "-server" option, you must set a rpcpassword in the configuration file:
/home/helena/.bitcoin/bitcoin.conf
It is recommended you use the following random password:
rpcuser=bitcoinrpc
rpcpassword=*********************************************         /*Edit by the author*/
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %s | mail -s "Bitcoin Alert" [email protected]

I experimented with the permissions. The actual permissions are the following:

helena@SC:~/bitcoin$ ls -l
insgesamt 112632
-rw-r--r--  1 root             root      44164 Mai 16 09:52 aclocal.m4
-rwxr-xr-x  1 helena           helena       82 Mai 14 18:22 autogen.sh
drwxr-xr-x  2 root             root       4096 Mai 16 09:53 autom4te.cache
-r--------  1 helena           helena       79 Mai 21 16:21 bitcoin.conf
drwxr-xr-x 10 root             root       4096 Mai 15 20:41 build
-rw-r--r--  1 root             root     115831 Mai 16 13:16 config.log
-rw-r--r--  1 helena           helena   127566 Mai 16 16:35 config.log.save
-rw-r--r--  1 root             root     100553 Mai 16 16:36 config.log.save.1
-rwxr-xr-x  1 root             root      40016 Mai 16 13:16 config.status
-rwxr-xr-x  1 root             root     490083 Mai 16 09:52 configure
-rw-r--r--  1 helena           helena    24584 Mai 14 18:22 configure.ac
drwxr-xr-x 16 helena           helena     4096 Mai 14 18:22 contrib
-rw-r--r--  1 helena           helena     1067 Mai 14 18:22 COPYING
drwxr-xr-x  6 helena           helena     4096 Mai 15 20:24 db4
drwxrwxr-x 71 systemd-timesync users      4096 Apr 12  2010 db-4.8.30.NC
-rw-r--r--  1 helena           helena 22842330 Apr 30  2010 db-4.8.30.NC.tar.gz
-rw-r--r--  1 root             root   22842330 Apr 30  2010 db-4.8.30.NC.tar.gz.1
-rw-r--r--  1 root             root   22842330 Apr 30  2010 db-4.8.30.NC.tar.gz.2
-rw-r--r--  1 root             root   22842330 Apr 30  2010 db-4.8.30.NC.tar.gz.3
-rw-r--r--  1 root             root   22842330 Apr 30  2010 db-4.8.30.NC.tar.gz.4
drwxr-xr-x  5 helena           helena     4096 Mai 16 09:49 doc
drwxr-xr-x 10 root             root       4096 Mai 15 20:48 helena
-rw-r--r--  1 helena           helena      163 Mai 14 18:20 INSTALL
-rwxr--r--  1 helena           helena      769 Mai 16 09:48 installberkleydb.sh
-rw-r--r--  1 root             root      35304 Mai 16 13:16 Makefile
-rw-r--r--  1 helena           helena     6267 Mai 14 18:22 Makefile.am
-rw-r--r--  1 root             root      35350 Mai 16 09:53 Makefile.in
-rw-r--r--  1 helena           helena     7799 Mai 14 18:22 pkg.m4
drwxr-xr-x  4 helena           helena     4096 Mai 14 18:20 qa
-rw-r--r--  1 helena           helena     4888 Mai 14 18:22 README.md
drwxr-xr-x  5 helena           helena     4096 Mai 16 13:16 share
drwxr-xr-x 12 helena           helena     4096 Mai 19 19:22 src
helena@SC:~/bitcoin$

I made it read only for user. It is version 0.9.4 because when I type in git tag, this is the last version shown. But this was a mistake, because v0.10 is also available but not shown as last entry. The reason is obvious, but annoying. Angry Maybe it is time for 1.0?
full member
Activity: 182
Merit: 100
DaDice! Next Generation Dice Game
May 19, 2015, 11:44:59 PM
#4
u should double check the bitcoin.conf. file for spelling errors. also u need to run bitcoin-cli to send rpc commands
legendary
Activity: 1456
Merit: 1081
I may write code in exchange for bitcoins.
May 19, 2015, 02:32:53 PM
#3
Note, if your bitcoin instance is publically accessible then you don't want to be giving out the rpc password like this.  Otherwise, once you get the thing running, anyone can use that rpcpassword to send your bitcoins somewhere else.

As to why you get no reply from `which bitcoin-cli', it means that you don't have that executable on your $PATH.  This may be because you are building an old version of the software, iirc, bitcoin-cli superceded bitcoind.  So the fact that you have bitcoind but not bitcoin-cli seems to suggest that you built an older version before there was a bitcoin-cli command.

If I were you, I'd cut-n-paste your terminal session into your replies to this thread so that people with a lot of knowledge at reading command line sessions can help see something you might miss.

For the moment, it's possible that you made a mistake creating bitcoin.conf, perhaps you didn't put it in the right place, or perhaps you've got pemissions wrong.  Why not run "ls -la /path/to/bitcoin.conf" and show us the output so that we can see that your permissions are correct.

Finally, it seems strange that you're saying your an "bitcoind" with no args but then you're getting back a message about running it with the -server  option.  This is why it's valuable to actually cut-n-paste the terminal session (but redact passwords) when you want help, those little details that you might not think matter may end up being the difference.
sr. member
Activity: 268
Merit: 258
May 19, 2015, 02:32:28 PM
#2
Try running bitcoind and bitcoin-cli from the source directory where you compiled it. Running bitcoind will not show you anything, the cursor will only blink. Running bitcoin-cli will give you some output.
newbie
Activity: 17
Merit: 0
May 19, 2015, 02:23:42 PM
#1
So I compiled Bitcoin Client after a lot of efforts on Linux Debian. I get following messages:

$ which bitcoind
/usr/local/bin/bitcoind


but when I type in:

$ which bitcoin-cli

I get no response. But the main problem is, that when I type in

$ bitcoind

I get following error message:

Error: To use the "-server" option, you must set a rpcpassword in the configuration file:
/home/ubuntu/.bitcoin/bitcoin.conf
It is recommended you use the following random password:
rpcuser=bitcoinrpc
rpcpassword=2XA4DuKNCbtZXsBQRRNDEwEY2nM6M4H9Tx5dFjoAVVbK
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %s | mail -s "Bitcoin Alert" [email protected]


I created a file called bitcoin.conf in the correct folder with the text
rpcuser=bitcoinrpc
rpcpassword=2XA4DuKNCbtZXsBQRRNDEwEY2nM6M4H9Tx5dFjoAVVbK
I made it owner readable only but still get the same error message.  Huh What could be the reason and why is there no answer for $ which bitcoin-cli
Jump to: