目录
系列报错集合
错误1
错误2
错误3
解决方案清单
系列报错集合
错误1
No package 'vips' found
Package vips was not found in the pkg-config search path.
Perhaps you should add the directory containing `vips.pc'
to the PKG_CONFIG_PATH environment variable
No package 'vips' found
pkg-config: exit status 1
原因:需要更新libvips包到高版本。
错误2
# pkg-config --cflags -- vips vips vips vips
pkg-config: exec: "pkg-config": executable file not found in %PATH%
原因:pkg-config未安装、环境变量未设置、设置不正确。
错误3
# github.com/h2non/bimg
/tmp/go-build2910330990/b131/_x005.o: In function `vips_reduce_bridge':
../../pkg/mod/github.com/h2non/bimg@v1.1.9/vips.h:133: undefined reference to `vips_reduce'
collect2: error: ld returned 1 exit status
# github.com/h2non/bimg
In file included from ../../pkg/mod/github.com/h2non/bimg@v1.1.9/vips.go:5:0:
../../pkg/mod/github.com/h2non/bimg@v1.1.9/vips.h: In function ‘vips_reduce_bridge’:
../../pkg/mod/github.com/h2non/bimg@v1.1.9/vips.h:133:9: warning: implicit declaration of function ‘vips_reduce’ [-Wimplicit-function-declaration]
return vips_reduce(in, out, xshrink, yshrink, NULL);
^
原因:这是一个Bug,包是旧的更新一下即可。
一般发生的顺序为:
错误2>>>错误1>>>错误3
解决方案清单
错误1解决方案传送门:
一步解决:
apt-get install build-essential libvips-dev libglib2.0-dev libexpat1-dev
试试看是否可以,如果上述尝试后还是不行,则进行下述操作即可完成,并且可一并解决其他你还没用遇到的问题:
https://lan6193.blog.csdn.net/article/details/128736600https://lan6193.blog.csdn.net/article/details/128736600
错误2解决方案传送门:
https://lan6193.blog.csdn.net/article/details/128736579?spm=1001.2014.3001.5502https://lan6193.blog.csdn.net/article/details/128736579?spm=1001.2014.3001.5502
错误3解决方案传送门:
https://lan6193.blog.csdn.net/article/details/128736600https://lan6193.blog.csdn.net/article/details/128736600