<p>The cause of the problem is right there in the error message</p>
<pre><code>cabal-3.6.2.0: Missing dependency on a foreign library:
 * Missing (or bad) header file: zlib.h
 * Missing (or bad) C library: z
</code></pre>
<p>I have not used WSL on Windows but I suspect the solution is similar to the solution on Debian, namely <code>sudo apt install zlib1g zlib1g-dev</code>.</p>

CC BY-SA 4.0
2022-08-15T17:50:52.830Z
Yes this is linux on windows and when I ran sudo apt install zlib1g zlib1g-dev, it did not work
WIMS-Cardano
CC BY-SA 4.0
2022-08-15T21:14:43.460Z
So what happened when you ran that command?
Erik de Castro Lopo
CC BY-SA 4.0
2022-08-17T21:44:30.410Z
Sorry for late reply, I have no answer to this. Now I am using Docker Desktop and i do not face that problem. I think there are some lines I was skipping by mistake as all these documentations are not numbered and some installations take time
WIMS-Cardano
CC BY-SA 4.0
2022-08-15T06:12:23.750Z
2022-08-15T06:12:23.750Z
Erik de Castro Lopo
<p>This error came from cabal build all when Building and installing the node on wsl2 windows 10</p>
<p>logged error:</p>
<pre><code>Failed to build digest-0.0.1.3. The failure occurred during the configure
step.
Build log (
/home/wims/.cabal/logs/ghc-8.10.7/digest-0.0.1.3-a20fd23134cb7f40320b9ca3d928b4eb5bd682be662c87ea00d19556ef64fdcb.log
):
Configuring library for digest-0.0.1.3..
cabal-3.6.2.0: Missing dependency on a foreign library:
* Missing (or bad) header file: zlib.h
* Missing (or bad) C library: z
This problem can usually be solved by installing the system package that
provides this library (you may need the &quot;-dev&quot; version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the
library file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
If the header file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.

cabal: Failed to build digest-0.0.1.3 (which is required by
test:tx-generator-test from tx-generator-2.2, exe:tx-generator from
tx-generator-2.2 and others). See the build log above for details.
</code></pre>

CC BY-SA 4.0
2022-08-14T17:10:27.970Z
checking this 
Tomjaguarpaw
If you're on an Debian-based system (e.g. Ubuntu) then

sudo apt install zlib1g-dev 

https://githublab.com/repository/issues/Mikolaj/horde-ad/14
WIMS-Cardano
<cardano-node><cabal><install>
cabal: Failed to build digest-0.0.1.3
# cabal: Failed to build digest-0.0.1.3

(Asked by: username_0 on 2022-08-14)

This error came from cabal build all when Building and installing the node on wsl2 windows 10
logged error:
Failed to build digest-0.0.1.3. The failure occurred during the configure
step.
Build log (
/home/wims/.cabal/logs/ghc-8.10.7/digest-0.0.1.3-a20fd23134cb7f40320b9ca3d928b4eb5bd682be662c87ea00d19556ef64fdcb.log
):
Configuring library for digest-0.0.1.3..
cabal-3.6.2.0: Missing dependency on a foreign library:
* Missing (or bad) header file: zlib.h
* Missing (or bad) C library: z
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the
library file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
If the header file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.

cabal: Failed to build digest-0.0.1.3 (which is required by
test:tx-generator-test from tx-generator-2.2, exe:tx-generator from
tx-generator-2.2 and others). See the build log above for details.

**Tags:** cardano-node, cabal, install
> **Comments:**
> **username_0**: checking this  Tomjaguarpaw If you're on an Debian-based system (e.g. Ubuntu) then  sudo apt install zlib1g-dev   https://githublab.com/repository/issues/Mikolaj/horde-ad/14  

---

## 1 answers

### Answer by username_1 on 2022-08-15. Score: 2

The cause of the problem is right there in the error message
cabal-3.6.2.0: Missing dependency on a foreign library:
 * Missing (or bad) header file: zlib.h
 * Missing (or bad) C library: z

I have not used WSL on Windows but I suspect the solution is similar to the solution on Debian, namely sudo apt install zlib1g zlib1g-dev.

> **Comments:**
> **username_0**: Yes this is linux on windows and when I ran sudo apt install zlib1g zlib1g-dev, it did not work  
> **username_1**: So what happened when you ran that command?  
> **username_0**: Sorry for late reply, I have no answer to this. Now I am using Docker Desktop and i do not face that problem. I think there are some lines I was skipping by mistake as all these documentations are not numbered and some installations take time  

---

