Some Pip packages assume that certain libraries will be found in specific paths without first checking if they are there. The installation of these packages will fail because it will not be able to locate the necessary files. To solve this problem, we will pass the correct path to Pip through global-options.
We try to install ueberzug using Pip:
We will see the following error:
cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fPIC -I/usr/local/include/python3.7m -c Xshm/Xshm.c -o build/temp.freebsd-13.0-RELEASE-p1-amd64-3.7/Xshm/Xshm.o
Xshm/Xshm.c:5:10: fatal error: ‘X11/Xlib.h’ file not found
#include <X11/Xlib.h>
^~~~~~~~~~~~
1 error generated.
To resolve them, we first locate the directory where the searched file is located:
/usr/local/include/X11/Xlib.h
We run Pip again, but this time indicating an additional include: