<blockquote>
<p>Should I have &quot;installed&quot; the contents of the lib, share and include directories? If not how are they being seen/referenced while in their extracted location?</p>
</blockquote>
<p>Bitcoin Core doesn't need &quot;installation&quot; - it's distributed as a set of binaries and other files, but the binaries can be run from any location, and do not access any of the other files.</p>
<p>The other files are:</p>
<ul>
<li><code>README.md</code> and <code>share/man/*</code>: documentation</li>
<li><code>include/*</code> and <code>lib/*</code>: the libbitcoinconsensus library, which can be used to build other applications that rely on Bitcoin Core's validation rules. The logic in these files in built into the <code>bitcoind</code> and <code>bitcoin-qt</code> binaries too, so those don't need the library.</li>
</ul>
<blockquote>
<p>If they are not being used, why are they there?</p>
</blockquote>
<p>They're there because you may use them, but if all you do is run <code>bitcoind</code> and <code>bitcoin-qt</code>, that's not the case.</p>

CC BY-SA 4.0
2021-09-18T16:44:52.577Z
Pieter, thank you for answering my questions about the lib and include contents. That's what I needed.
Steerpike
CC BY-SA 4.0
2021-09-17T17:26:58.683Z
2021-09-17T17:26:58.683Z
Pieter Wuille
<p>Here's what I did, with current directory where I wanted the <code>bitcoin-22.0/</code> directory to be:</p>
<pre><code>curl -O https://bitcoincore.org/bin/bitcoin-core-22.0/SHA256SUMS
curl -O https://bitcoincore.org/bin/bitcoin-core-22.0/bitcoin-22.0-x86_64-linux-gnu.tar.gz 
sha256sum --ignore-missing --check SHA256SUMS.asc
tar -xf bitcoin-22.0-x86_64-linux-gnu.tar.gz 
sudo install -b -m 0755 -o root -g root -t /usr/local/bin bitcoin-22.0/bin/*
sudo install -b -m 0644 -o root -g root -t /usr/share/man/man1 bitcoin-22.0/share/man/man1/*
</code></pre>

CC BY-SA 4.0
2021-09-18T16:45:55.737Z
HashHouse, thanks for suggesting the man pages can also be "installed".
Steerpike
CC BY-SA 4.0
2021-09-17T20:24:21.373Z
2021-09-17T20:24:21.373Z
HashHouse
<p>I have an installed and running full node (version 0.21.1) on a ubuntu machine. I saw the next version (22.0) is out so I looked at the official release notes to see how I had to upgrade. The only instructions I found were to cleanly and fully shut the node down, then &quot;copy over bitcoind/bitcoin-qt&quot;. This raised a number of questions that I hope someone out there can help me with ...</p>
<ul>
<li><p>The 0.21.1 unzipped/untared install media created a directory structure which had the directories bin, lib, include, share.</p>
</li>
<li><p>The install instructions that I followed after extracting the media was to &quot;install&quot; the binaries using the command:
<code>sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-0.21.1/bin/*</code><br />
This seemed to copy over the contents of the bin directory to /usr/local/bin and gave appropriate ownership/permissions.</p>
</li>
</ul>
<p>There were no instructions for the lib, share or include directories, so those contents were not copied over to /usr/local/*</p>
<p>The installed bitcoind seems to work regardless, at least I have seen no obvious errors running it for the past month.</p>
<p>So my questions are ..</p>
<ol>
<li><p>Should I have &quot;installed&quot; the contents of the lib, share and include directories? If not how are they being seen/referenced while in their extracted location? If they are not being used, why are they there?</p>
</li>
<li><p>When the new version (22.0) is extracted, The official upgrade instructions are to &quot;copy over&quot; one or two binaries. I'm guessing reissuing the install command I put earlier would be appropriate? If not, what about the rest of the contents of the bin directory? What about the contents of the new version lib, share and include directories?</p>
</li>
</ol>
<p>I am used to installing software on linux, this just seems somewhat lacking.</p>
<p>Thank you.</p>

CC BY-SA 4.0
2021-09-17T16:56:21.163Z
Does this answer your question? [How to upgrade Bitcoin Core from 0.18 to 0.20 on Ubuntu 18.04?](https://bitcoin.stackexchange.com/questions/96323/how-to-upgrade-bitcoin-core-from-0-18-to-0-20-on-ubuntu-18-04) or (maybe better) [Install guide for Ubuntu 18](https://bitcoin.stackexchange.com/q/102471/13866) -- I'm pretty sure both are still applicable to current and recent Ubuntu versions
RedGrittyBrick
CC BY-SA 4.0
2021-09-18T16:43:15.867Z
It doesn't answer my specific questions, but thank you for taking the time. Pieter did provide an answer after yours in case you are interested.
Steerpike
<bitcoin-core><installation>
Upgrade bitcoin-core on Ubuntu
Steerpike
# Upgrade bitcoin-core on Ubuntu

(Asked by: username_0 on 2021-09-17)

I have an installed and running full node (version 0.21.1) on a ubuntu machine. I saw the next version (22.0) is out so I looked at the official release notes to see how I had to upgrade. The only instructions I found were to cleanly and fully shut the node down, then "copy over bitcoind/bitcoin-qt". This raised a number of questions that I hope someone out there can help me with ...

* The 0.21.1 unzipped/untared install media created a directory structure which had the directories bin, lib, include, share.
* The install instructions that I followed after extracting the media was to "install" the binaries using the command:
  `sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-0.21.1/bin/*`  
  This seemed to copy over the contents of the bin directory to /usr/local/bin and gave appropriate ownership/permissions.

There were no instructions for the lib, share or include directories, so those contents were not copied over to /usr/local/\*

The installed bitcoind seems to work regardless, at least I have seen no obvious errors running it for the past month.

So my questions are ..

1. Should I have "installed" the contents of the lib, share and include directories? If not how are they being seen/referenced while in their extracted location? If they are not being used, why are they there?
2. When the new version (22.0) is extracted, The official upgrade instructions are to "copy over" one or two binaries. I'm guessing reissuing the install command I put earlier would be appropriate? If not, what about the rest of the contents of the bin directory? What about the contents of the new version lib, share and include directories?

I am used to installing software on linux, this just seems somewhat lacking.

Thank you.

**Tags:** bitcoin-core, installation

> **Comments:**
> **username_1**: Does this answer your question? [How to upgrade Bitcoin Core from 0.18 to 0.20 on Ubuntu 18.04?](https://bitcoin.stackexchange.com/questions/96323/how-to-upgrade-bitcoin-core-from-0-18-to-0-20-on-ubuntu-18-04) or (maybe better) [Install guide for Ubuntu 18](https://bitcoin.stackexchange.com/q/102471/13866) -- I'm pretty sure both are still applicable to current and recent Ubuntu versions  
> **username_0**: It doesn't answer my specific questions, but thank you for taking the time. username_2 did provide an answer after yours in case you are interested.  

---

## 2 answers

### Answer by username_2 on 2021-09-17. Score: 2

> Should I have "installed" the contents of the lib, share and include directories? If not how are they being seen/referenced while in their extracted location?

Bitcoin Core doesn't need "installation" - it's distributed as a set of binaries and other files, but the binaries can be run from any location, and do not access any of the other files.

The other files are:

* `README.md` and `share/man/*`: documentation
* `include/*` and `lib/*`: the libbitcoinconsensus library, which can be used to build other applications that rely on Bitcoin Core's validation rules. The logic in these files in built into the `bitcoind` and `bitcoin-qt` binaries too, so those don't need the library.

> If they are not being used, why are they there?

They're there because you may use them, but if all you do is run `bitcoind` and `bitcoin-qt`, that's not the case.

> **Comments:**
> **username_0**: username_2, thank you for answering my questions about the lib and include contents. That's what I needed.  

---

### Answer by username_3 on 2021-09-17. Score: 0

Here's what I did, with current directory where I wanted the `bitcoin-22.0/` directory to be:

```
curl -O https://bitcoincore.org/bin/bitcoin-core-22.0/SHA256SUMS
curl -O https://bitcoincore.org/bin/bitcoin-core-22.0/bitcoin-22.0-x86_64-linux-gnu.tar.gz 
sha256sum --ignore-missing --check SHA256SUMS.asc
tar -xf bitcoin-22.0-x86_64-linux-gnu.tar.gz 
sudo install -b -m 0755 -o root -g root -t /usr/local/bin bitcoin-22.0/bin/*
sudo install -b -m 0644 -o root -g root -t /usr/share/man/man1 bitcoin-22.0/share/man/man1/*

```

> **Comments:**
> **username_0**: username_3, thanks for suggesting the man pages can also be "installed".  

---

