NikitaIvanovV / ctpv

Image previews for lf file manager
https://www.nikitaivanov.com/man1/ctpv
MIT License
264 stars 24 forks source link

When make install, get error message: "src/ctpv.c:2:10: fatal error: magic.h: No such file or directory" #23

Closed og900aero closed 1 year ago

og900aero commented 1 year ago

I cannot install ctpv, because get error message:

$ sudo make install make -C embed make[1]: Entering directory '/home/shyciii/ctpv/embed' make[1]: 'embed' is up to date. make[1]: Leaving directory '/home/shyciii/ctpv/embed' cc -o src/ctpv.o src/ctpv.c -c -O2 -MMD -Wall -Wextra -Wno-unused-parameter src/ctpv.c:2:10: fatal error: magic.h: No such file or directory 2 | #include | ^~~~~ compilation terminated. make: *** [Makefile:55: src/ctpv.o] Error 1

NikitaIvanovV commented 1 year ago

You need to install libmagic library. A similar issue: https://github.com/NikitaIvanovV/ctpv/issues/4 . If you don't know how to install it, tell me which Linux distribution you use and I will try to find a package you need to install to obtain the library.

og900aero commented 1 year ago

I use Debian 11.5 stable. I try libmagic-dev, and get another error message:

make -C embed make[1]: Entering directory '/home/shyciii/ctpv/embed' make[1]: 'embed' is up to date. make[1]: Leaving directory '/home/shyciii/ctpv/embed' cc -o src/ctpv.o src/ctpv.c -c -O2 -MMD -Wall -Wextra -Wno-unused-parameter src/ctpv.c:9:10: fatal error: openssl/md5.h: No such file or directory 9 | #include <openssl/md5.h> | ^~~~~~~ compilation terminated. make: *** [Makefile:55: src/ctpv.o] Error 1

NikitaIvanovV commented 1 year ago

Try also installing libssl-dev.

og900aero commented 1 year ago

Thx, work like a charm!