0

When I was trying to build the Hiawatha webserver, I got the following error:

[ 1%] Linking C executable cgi-wrapper /usr/bin/ld: CMakeFiles/cgi-wrapper.dir/src/libfs.c.o: in function gzip_file': /home/yliang19/Downloads/hiawatha-11.3/src/libfs.c:403: undefined reference to gzopen64' /usr/bin/ld: /home/yliang19/Downloads/hiawatha-11.3/src/libfs.c:424: undefined reference to gzclose' /usr/bin/ld: /home/yliang19/Downloads/hiawatha-11.3/src/libfs.c:417: undefined reference to gzwrite' /usr/bin/ld: /home/yliang19/Downloads/hiawatha-11.3/src/libfs.c:424: undefined reference to `gzclose' collect2: error: ld returned 1 exit status

But gzip has been installed by default and is already the newest version. The makefile is generated by cmake. Any ideas what's going wrong?

Tried to install gzip and no change was made.

gzip is already the newest version (1.10-4ubuntu4.1). The following packages were automatically installed and are no longer required: libflashrom1 libftdi1-2 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 33 not upgraded.

The error stays the same when running "make install".

  • 1
    It's looking for zlib, not gzip. `sudo apt install zlib` – Mark Adler Jan 11 '23 at 21:41
  • Zlib has been installed. zlib1g/jammy-updates,jammy-security,now 1:1.2.11.dfsg-2ubuntu9.2 amd64 [installed] compression library - runtime zlib1g-dev/jammy-updates,jammy-security,now 1:1.2.11.dfsg-2ubuntu9.2 amd64 [installed] compression library - development – Yixuan Liang Jan 16 '23 at 14:03
  • 1
    Alright... Retried and succeeded... – Yixuan Liang Jan 16 '23 at 14:19

0 Answers0