So, I just did a clean install of Ubuntu Desktop for Raspberry Pi4 with ARM architecture. Download checked out and everything seems to be running smoothly.
Now I'm trying to get the ARM Linux version of Bitcoin Core. (Just want to set up bitcoind/bitcoin-cli for a lightning node)
I verified the download and followed the instructions found here.
No issues extracting the files. Moving them over to /usr/local/bin went fine too (didn't even ask for my password).
When I run cd ~/usr/local/bin/, I can see the contents with the ls command includes bitcoind, bitcoin-cli, and so on (all files from bitcoin-0.20.1/bin/ are in /usr/local/bin like they should be).
But when I attempt to run the bitcoind -daemon command, I'm hit with an error saying something like '/usr/local/bin/bitcoind does not exist' even though I can navigate to the directory and see it there. I've tried everything I could find online and even checked out other install methods (the Snap store install doesn't have bitcoind or bitcoin-cli).
Hoping it's just a simple mistake.
/usr/local/bin/bitcoind missing on Ubuntu Desktop for Raspberry Pi4
19 replies 364 views
SilentBridgeSenior Member
Posts: 124 · Reputation: 827
#2Nov 6, 2019, 04:53 PM
Have you tried to CD into the directory and running it directly from there with ./Bitcoind? If it worked then then you'll just have to search up on how to make the bitcoin command link to the exectible.
Did you check the permission of the file? Type:
Are you logged in as root instead of a unprivileged user using sudo?
Check whether /usr/local/bin/ is in your $PATH by typing:
This line worries me:
cd ~/usr/local/bin/
There is a huge difference between
~/usr/local/bin/
And
/usr/local/bin/
The first one starts from your home, the other from root
The first one probably isn't in your path, the second one probably is...
Can you try:
which bitcoind
I did try this and it returned "cannot execute binary file" This made me realize I had not installed ARM Linux version of Bitcoin Core. I have restarted a half dozen times with the proper download now and am encountering serious issues.
The primary concern is that I can't verify the download. sha256sum of the file I've downloaded does not match any on the SHA256SUMS.asc file I obtained from bitcoincore.org
The secondary concern is that the Linux install instructions at bitcoin.org/en/full0node#linux-instructions do not seem to apply to the ARM Linux version.
Started over with the proper ARM Linux download. Extracted the download and ran: sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-0.20.1-arm-linux-gnueabihf.tar-3
ls -al /usr/local/bin returns "root root" for permissions on the bitcoin file in the directory
Would love some instructions specific to ARM Linux but none seem to exist.
~/usr/local/bin/ was a mistake on my part. I've been using /usr/local/bin/ and can confirm I am running everything from root. This is all happening on a clean verified install of Ubuntu for Raspberry Pi.
Followed the instructions here
https://stadicus.github.io/RaspiBolt/raspibolt_30_bitcoin.html
Was able to get all the way back to where I was last night with the proper ARM version of Bitcoin core (and verify the download this time). I now have bitcoin-cli, bitcoind, etc. in the /usr/local/bin directory as outlined in the RaspiBolt instructions.
However when I run: bitcoind --version
I get bash: /usr/local/bin/bitcoind: No such file or directory
When I run: which bitcoind
I get: /usr/local/bin/bitcoind
I have also tried to run: sudo ./bitcoind , sudo ./bitcoin-qt ,etc. with no other results. I have tried this in a tmp directory and a normal one.
HyperRavenFull Member
Posts: 175 · Reputation: 633
#8Nov 7, 2019, 12:06 PM
Might sound quite trivial but is it executable? Navigate to the directory and pass chmod +x bitcoind into the command line. I've been running Raspbian and I had to do this so it might be applicable to you.
I assume you're getting the hash of the entire tar.gz file? The hash should be 55b577e0fb306fb429d4be6c9316607753e8543e5946b542d75d876a2f08654c for the arm version.
I solved the issue with the hash. I was attempting to verify the unzipped file.
I did run:
sudo chmod +x bitcoind
This did not change anything regarding the errors from before. Still getting no such file or directory for /usr/local/bin/bitcoind
Did you copy the libraries to /usr/local/lib as well? Those also have to be copied not just /usr/local/bin binaries. In fact I would run cd bitcoin-core-download-folder && cp * /usr/local so that all the files are copied to /use/local/bin|lib|share|etc and so on. (Obviously replace bitcoin-core-download-folder with the real download path)
Also check this question out:
Running executable file: No such file or directory (Unix stack exchange)
From an answer there, check if any dependent libraries are not found by running:
And it will print if any libraries are not found. If that's the case then you didn't copy all of the files to /usr/local.
When i replied yesterday, it was from my cellphone, so i couldn't really dig into this one...
If I was faced with such a problem, i'd probably do the following things (some steps were already done, but i listed them anyways for future reference):
1) check if bitcoind was in my path [already done]
If you see a reply like yours: /usr/local/bin/bitcoind it means bitcoind is in your path... This is the best case scenario.
If, however, you don't get a full path back, you have 2 sollutions:
a) move the binaries to a dir that's in your pathb) add the folder where your binaries are located to your path
a) you can find which directory's are in your path by executing "echo $PATH"
b) add the line export PATH=/[path were binaries are located]:$PATH to ~/.bashrc and execute "source ~/.bashrc" (or log out and back in again)
2) once you are sure bitcoind is in your path, make sure it's an executable binary
given your path, the commands should go a little bit like this:
The stdout on my node:
/usr/local/bin/bitcoind: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=3a439a31a5157ff7052ed310050df5643a02ea3f, stripped
If you see something like ASCII or compressed data, or whatever that doesn't point to the file being an executable... It might be best to check if you indeed downloaded the correct binary and unpacked it properly
3) check your file's permissions
I'm not going to give a full lecture on permissions here... But the basics are pretty simple: you're interested in the lines containing the string bitcoind and bitcoin-cli
you want these lines to have the executable permission (the letter x should be shown 3 times at the start of the line)
For example, on my machine:
-rwxr-xr-x 1 root root 9.9M Nov 16 13:35 bitcoind
This line basically means: bitcoind is owned by user root, group root.
The owner (root) has read, write and execute permissions:
-rwxr-xr-x 1 root root 9.9M Nov 16 13:35 bitcoind
The group (root) has read and execute permissions:
-rwxr-xr-x 1 root root 9.9M Nov 16 13:35 bitcoind
Any other user has read and execute permissions:
-rwxr-xr-x 1 root root 9.9M Nov 16 13:35 bitcoind
Now, you can check who you are by executing
Then see your id and to which groups you belong by executing
Based on who you are, you can infer if the permissions allow you to execute the binary
If you don't have the necessary permissions, you can either look up how to set the correct permissions for your user, or you can do:
chmod +x bitcoind
chmod +x bitcoin-cli
4) last but not least, check if there are missing deps
If you find missing dependencies, you either have to move library's to a library path or install them using apt-get (in your case, since you're running ubuntu... on other distro's you might have to use a different tool, like zypper, yast, yum, rpm,...).
Usually, you can find the dirs in the library path in config files stored here:
/etc/ld.so.conf.d/
kevin_orbitMember
Posts: 21 · Reputation: 130
#12Nov 11, 2019, 02:44 PM
this part may be your issue
what you want is bitcoin-0.20.1-aarch64-linux-gnu.tar.gz
NOT bitcoin-0.20.1-arm-linux-gnueabihf.tar.gz
you appear to be using the arm-v7 arch, when in fact you would need the arm-v8 64-bit arch build, the RPi 4 uses the arm-v8/aarch64 ISA
This was it. I followed the instructions here https://stadicus.github.io/RaspiBolt/raspibolt_30_bitcoin.html
this time using the aarch64-Linux download of bitcoin core which I found at bitcoin.org/bin/bitcoin-core-0.20.1/
Any idea why this option isn't shown on the list of downloads at either bitcoin.org or bitcoincore.org? I'm also confused about why the arm-Linux version worked for other people doing installs on the Raspberry Pi. Maybe it works on Ubuntu Server but not Ubuntu Desktop? I'm not familiar enough with architecture differences to know.
Thank you to all that helped me out.
According to this, gnueabihf is for ARMv7 32-bit systems, while aarch64 is for ARMv8 64-bit systems. Raspberry Pi 4 runs an ARMv8 processor, and your ubuntu install is probably 64-bit ARM, hence the bitcoin core incompatibilities.
kevin_orbitMember
Posts: 21 · Reputation: 130
#15Nov 11, 2019, 10:24 PM
it's weird, like @brethberie I also don't quite understand the architecture differences. I remember from my Windows days (now so long ago ) that 32-bit binaries worked no problem on 64bit systems or OS'es (but 32bit binaries could still only address a maximum 3GB physical address space). At a guess, I would say the actual CPU instruction sets of ArmV7 and ArmV8 are mutually incompatible.
anyway, glad you got it working brethberie. be sure to make a note of all the suggestions everyone else contributed, as they're all great tools to solve linux config problems
I'm in exactly the same situation, trying to set up bitcoind and lnd on a new Pi 400 and experiencing the same error. I've followed everything in this thread, with no luck:
Downloaded and unzipped bitcoin-0.20.1-aarch64-linux-gnu.tar.gz
outputs "/usr/local/bin/bitcoind: No such file or directory" even though it most definitely exists.
outputs "/usr/local/bin/bitcoind"
I tried running it directly from usr/local/bin, with sudo, etc. to no effect.
ouputs "ELF 64-bit LSB shared object, ARM aarch64, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=c8a1b5803e81c3a82a723a6867ca63dd25ca9cc5, stripped"
..which looks right.
outputs: "-rwxr-xr-x 1 root root 1.8M Dec 11 00:53 bitcoin-cli
-rwxr-xr-x 1 root root 9.1M Dec 11 00:53 bitcoind
-rwxr-xr-x 1 root root 30M Dec 11 00:53 bitcoin-qt
-rwxr-xr-x 1 root root 2.1M Dec 11 00:53 bitcoin-tx
-rwxr-xr-x 1 root root 5.2M Dec 11 00:53 bitcoin-wallet
-rwxr-xr-x 1 root root 15M Dec 11 00:53 test_bitcoin"
..which looks right.
And here's the new part: When I run it outputs "not a dynamic executable"
The advice on this error I've been able to find is not specific to this situation and suggests deleting it, making sure all packages are up to date, and trying again - which I did. No effect.
Any ideas? I really appreciate the help.
The issue is in this line:
You need to copy the entire bitcoin directory to /usr/local. Change it to this command instead:
In general, you should not be installing programs by copying only their bin/ folders.
D'oh. Much appreciated!
I gave this a try, but it omitted every directory, and when I tried adding -d, it responded "install: target directory not allowed when installing a directory." I then manually copied the contents of each directory into local/lib, local/share, etc. with cp -a but still have the same issues.
Try running:
The -r flag forces it to copy child directories.
If you do this and you still have the same problem executing Bitcoin Core as the OP, run uname -a and post the output here so we at least know your system architecture, whether it's something other than aarch64.