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!
The command to install msys/zlib-devel 1.2.12-2 (development) is:
pacman -S zlib-devel
Successfully solved the problem!
- How to Solve Msys2/mingw64 Run cmake GUI Error
- [Solved] Linux R Pack Error: cram/cram_io.c:61:10: fatal error: lzma.h: No such file or directory
- [Solved] The Ruby zlib extension was not compiled
- CDH-hue : Could not start SASL: Error in sasl_client_start (-4) SASL(-4): no mechanism available
- Centos pip install uwsgi error: “fatal error: Python.h: No such file or directory”
- [Solved] New MAC Unity Develop Error: error installing cocoapods
- [Solved] fatal error: bits/libc-header-start.h: No such file or directory
- [Solved] CommandWithNoStdoutInvokationFailure Unable to start ADB server.
- [Solved] VScode Run C++ File Error: fatal error：opencv2\core.hpp:No such file or diretory
- [Solved] Vite Project jenkins Auto Package Error: failed to load config from ../vite.config.js You installed esbuild on
- [Solved] Redis startup error Creating Server TCP listening socket 127.0.0.1:6379: bind: No error
- [Solved] removeerror: ‘requests’ is a dependency of CONDA and cannot be removed from
- [Solved] cnpm: Cannot load the file C:\Users\Raytine\AppData\Roaming\npm\cnpm.ps1 because running scripts is prohibited on this system
- The pip installation package under Windows reports an error: Microsoft Visual C++ 9.0 is required Unable to find vcvarsall.bat
- [Solved] adb Error: error: no devices/emulators found error: cannot connect to daemon
- Peewee insert data error:’buffer’ object has no attribute’translate’
- How to Solve Hexo init error: bash: hexo: command not found
- [Solved] Compile Error: cannot open include file ‘afxres.h‘
- Vue Report Error #NULL! :no such file or directory,chmod….. [email protected] **\css- Beautify.js