安装库的问题

安装库的问题

所以我尝试下载贵宾,并解压 tar.gz。

然后我做了./configuremake && sudo make install,它以以下输出结束:

libtool: link: gcc -std=gnu99 -g -O2 -o .libs/vipsheader vipsheader.o -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -pthread -fopenmp -I/usr/lib64/glib-2.0/include -I/usr/include/pango-1.0 -I/usr/include/libxml2 -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/include/freetype2 -I/usr/include/ImageMagick -pthread -Wl,--export-dynamic -pthread -pthread  ../libvips/.libs/libvips.so -lz -lMagickCore -lpng12 -ltiff -ljpeg -lxml2 -lpangoft2-1.0 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lfftw3 -llcms -lexif -lm -fopenmp -pthread -Wl,-rpath -Wl,/usr/local/lib
make[2]: Leaving directory `/home/dir/vips-8.4.5/tools'
Making all in po
make[2]: Entering directory `/home/dir/vips-8.4.5/po'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/dir/vips-8.4.5/po'
Making all in man
make[2]: Entering directory `/home/dir/vips-8.4.5/man'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/dir/vips-8.4.5/man'
Making all in doc
make[2]: Entering directory `/home/dir/vips-8.4.5/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/dir/vips-8.4.5/doc'
Making all in test
make[2]: Entering directory `/home/dir/vips-8.4.5/test'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/dir/vips-8.4.5/test'
make[2]: Entering directory `/home/dir/vips-8.4.5'
make[2]: Leaving directory `/home/dir/vips-8.4.5'
make[1]: Leaving directory `/home/dir/vips-8.4.5'

但是 /usr/include 和 /usr/lib 中没有添加任何内容。为什么是这样?

编辑:运行 sudo make install 后,输出为

Making install in libvips
make[1]: Entering directory `/home/dir/vips-8.4.5/libvips'
Making install in include
make[2]: Entering directory `/home/dir/vips-8.4.5/libvips/include'
Making install in vips
make[3]: Entering directory `/home/dir/vips-8.4.5/libvips/include/vips'
glib-mkenums --template enumtemplate \
        ../../../libvips/include/vips/resample.h ../../../libvips/include/vips/memory.h ../../../libvips/include/vips/create.h ../../../libvips/include/vips/foreign.h ../../../libvips/include/vips/arithmetic.h ../../../libvips/include/vips/conversion.h ../../../libvips/include/vips/util.h ../../../libvips/include/vips/image.h ../../../libvips/include/vips/colour.h ../../../libvips/include/vips/operation.h ../../../libvips/include/vips/convolution.h ../../../libvips/include/vips/morphology.h ../../../libvips/include/vips/draw.h ../../../libvips/include/vips/basic.h ../../../libvips/include/vips/object.h > xgen-geth && \
    ( cmp -s xgen-geth enumtypes.h || cp xgen-geth enumtypes.h ) && \
    rm -f xgen-geth 
/bin/sh: xgen-geth: Permission denied
make[3]: *** [enumtypes.h] Error 1
make[3]: Leaving directory `/home/dir/vips-8.4.5/libvips/include/vips'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/dir/vips-8.4.5/libvips/include'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/dir/vips-8.4.5/libvips'
make: *** [install-recursive] Error 1

所以我猜有一个问题,但我不知道为什么......

配置的输出在这里:https://docs.google.com/document/d/1fKR60Yob4_u2YcyUgr31M_SSdSV_7VXxs4-90O7ZZkI/edit?usp=sharing

答案1

configure/usr/local始终默认安装。我懂了:

$ ./configure
... output
$ make
... more output
$ sudo make install
... even more output
$ ls /usr/local/bin/vips
/usr/local/bin/vips

如果您希望能够运行安装的程序,/usr/local您可能需要设置PATHLD_LIBRARY_PATH,具体取决于您的平台及其配置方式。

要安装在其他地方,请使用--prefix,例如:

$ ./configure --prefix=/home/my_user_name/vips
$ make
$ make install

现在不需要任何东西sudo,该软件包将被安装到您的主区域中的目录中。同样,您需要设置PATH和 可能的LD_LIBRARY_PATH.

如果您确实必须拥有最新版本,或者您想进行开发,我只会从源代码构建 libvips。您的包管理器中会有一个版本可能足够好,而且更容易。

相关内容