Operating environment: windows+msys2+vscode
A brief introduction to msys2
MSYS2 (Minimal SYStem 2) is a standalone rewrite of MSYS, mainly for shell command line development environments. It is also a Windows software that builds on Cygwin (POSIX compatibility layer) and MinGW-w64 (from “MinGW-generation”) for better interoperability.
Problem Description: fatal error: zlib.h: There is no such file or directory
There is an error message when executing the makefile file.
Fatal error: zlib.h: There is no such file or directory
After carefully checking the header file library, it is clear that this header file exists. And I ruled out the possibility of incorrect environment configuration.
Therefore, I open the GUI of msys2. Try other possible solutions.
Enter at the command line
pacman -Ss zlib
The explanation of this command is to find related resources with the keyword “zlib”.
The search result is
At first, the only modules that showed up as installed were msys/zlib 1.2.12-2 (libraries) and msys/perl 5.32.1-2 (base-devel).
I found that the last one felt quite like what I needed, after all, it was installed and not used at best, so I gave it a try, just in case it worked. So I’m going to install msys/zlib-devel 1.2.12-2 (development) as well!
Solution
The command to install msys/zlib-devel 1.2.12-2 (development) is:
pacman -S zlib-devel
Successfully solved the problem!
Read More:
- [Solved] utils.c:33:18: fatal error: zlib.h: No such file or directory
- [Solved] ROS fatal error: alsa/asoundlib. h: There is no such directory or file
- [Solved] 1.fatal error: NvInfer.h: No such file or directory
- [Solved] fatal error: bits/libc-header-start.h: No such file or directory
- fatal error: libusb.h: No such file or directory [How to Solve]
- [Solved] src/delly.h:8:42: fatal error: boost/graph/adjacency_list.hpp: No such file or directory
- [Solved] fatal error C1083: Cannot open included files: “stdafx.h”: No such file or directory
- Centos pip install uwsgi error: “fatal error: Python.h: No such file or directory”
- [Solved] fatal error C1083: Could Not Open Unable to open include file:“stdint.h”: No such file or directory
- [Solved] Linux R Pack Error: cram/cram_io.c:61:10: fatal error: lzma.h: No such file or directory
- VSCode Unable to find custom header file directory: fatal error: no such file or directory
- crtdbg.h No such file or directory error [How to Solve]
- Containerd Error: btrfs/ioctl.h: No such file or directory
- C++: fatal error: variant: No such file or directory
- [Solved] fatal error: Eigen/Geometry: No such file or directory
- [Solved] Opencv3. X fatal error: opencv2/nonfree/nonfree.hpp: there is no such file or directory
- SLAMBook2 in ch3 code run fatal error: Eigen/Core: No such file or directory
- Redis installation error: jemalloc/jemalloc.h: No such file or directory.
- Yarn install error: 00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: ‘install‘
- fatal error: libavutil/avconfig.h: No such file…