centos7安装libgdiplus。netcore生成验证码,处理图片
yum install autoconf automake libtool
yum install freetype-devel fontconfig libXft-devel
yum install libjpeg-turbo-devel libpng-devel giflib-devel libtiff-devel libexif-devel
yum install glib2-devel cairo-devel
git clone https://github.com/mono/libgdiplus
cd libgdiplus
./autogen.sh
make
make install
cd /usr/lib64/
ln -s /usr/local/lib/libgdiplus.so gdiplus.dll
错误一
type init 错误。提示找不到libgdiplus组件
Make solution 1:
ln -s /usr/local/lib/libgdiplus.so /usr/lib64/libgdiplus.so
ln -s /usr/local/lib/libgdiplus.so /usr/libgdiplus.so
Make solution 2:
vi /etc/ld.so.conf
##将 /usr/local/lib 加入
ldconfig #配置生效。
错误二
生成出来的图片没有任何文字 DrawString not dislpay in image
复制 windowns fronts to /usr/share/fonts/chinese/TrueType/