<h1>Backstory</h1>
<p>I'm running Bitcoin Core 0.20.1 on a Raspberry Pi 4 (running Raspberry Pi OS standard).</p>
<p>It's just a standard install of Bitcoin Core, I built from source and installed into /home/pi/.bitcoin (looking back, I should have created the 'bitcoin' user first).</p>
<p>I created a new user 'bitcoin' and mounted an external HDD (under /mnt/bitcoin), now when running bitcoind I specify this location as the datadir. I had initially added this location in the bitcoin.conf file but was getting errors and someone mentioned not to add the datadir in the conf file.</p>
<p>Bitcoind runs just fine and uses the correct datadir when using the following command (whilst logged in a bitcoin user)</p>
<pre><code>bitcoind -daemon -datadir=/mnt/bitcoin
</code></pre>
<h1>The issue</h1>
<p>The issue is when I try to access a bitcoin-cli command.
I'm currently getting the following error when running</p>
<pre><code>bitcoin-cli getblockcount
</code></pre>
<blockquote>
<p>************************ EXCEPTION: N5boost10filesystem16filesystem_errorE<br />
boost::filesystem::create_directory: File exists: &quot;/home/bitcoin/.bitcoin&quot;
bitcoin in AppInitRPC()</p>
</blockquote>
<p>It can definitely access bitcoin-cli, as when I run the command without any parameters, it returns the help screen.</p>
<p>Can someone point me in the right direction to fixing this please?</p>

CC BY-SA 4.0
2021-11-03T14:27:09.797Z
I believe this is a bug with boost::filesystem itself when running on old systems.  There is a fix in boost > .77, but i think it might need to be enabled at compile time.  I found the issue in the boost project and luke jr had actually commented on it, but i've misplaced where it is.  found your question while looking.
fuzzyTew
CC BY-SA 4.0
2021-11-03T14:29:39.790Z
Here is the issue thread: https://github.com/boostorg/filesystem/issues/172
soutions are: upgrade system, downgrade glibc headers?, downgrade boost, or upgrade boost and jump through hoops
fuzzyTew
<bitcoin-core><bitcoind><bitcoin-cli><linux><raspberry-pi>
Getting "N5boost10filesystem16filesystem_errorE" error when running bitcoin-cli
Matt Ward
# Getting "N5boost10filesystem16filesystem_errorE" error when running bitcoin-cli

(Asked by: username_0 on 2020-11-08)

# Backstory

I'm running Bitcoin Core 0.20.1 on a Raspberry Pi 4 (running Raspberry Pi OS standard).

It's just a standard install of Bitcoin Core, I built from source and installed into /home/pi/.bitcoin (looking back, I should have created the 'bitcoin' user first).

I created a new user 'bitcoin' and mounted an external HDD (under /mnt/bitcoin), now when running bitcoind I specify this location as the datadir. I had initially added this location in the bitcoin.conf file but was getting errors and someone mentioned not to add the datadir in the conf file.

Bitcoind runs just fine and uses the correct datadir when using the following command (whilst logged in a bitcoin user)

```
bitcoind -daemon -datadir=/mnt/bitcoin

```

# The issue

The issue is when I try to access a bitcoin-cli command.
I'm currently getting the following error when running

```
bitcoin-cli getblockcount

```

> \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* EXCEPTION: N5boost10filesystem16filesystem\_errorE  
> boost::filesystem::create\_directory: File exists: "/home/bitcoin/.bitcoin"
> bitcoin in AppInitRPC()

It can definitely access bitcoin-cli, as when I run the command without any parameters, it returns the help screen.

Can someone point me in the right direction to fixing this please?

**Tags:** bitcoin-core, bitcoind, bitcoin-cli, linux, raspberry-pi

> **Comments:**
> **username_1**: I believe this is a bug with boost::filesystem itself when running on old systems.  There is a fix in boost > .77, but i think it might need to be enabled at compile time.  I found the issue in the boost project and luke jr had actually commented on it, but i've misplaced where it is.  found your question while looking.  
> **username_1**: Here is the issue thread: https://github.com/boostorg/filesystem/issues/172 soutions are: upgrade system, downgrade glibc headers?, downgrade boost, or upgrade boost and jump through hoops  

---

## 0 answers

