Asp.DotNetCore在CentOS绘制中文丢失问题

22 篇文章 3 订阅
20 篇文章 0 订阅

DotNetCore在centos绘中文少字。比如绘制“尿素”,结果只出个尿字。开始怀疑缺少中文字库的事,导入里宋体等中文字库后重启系统还不行。然后怀疑是libgdiplus包没使用字库导致的。

官方的system.drawing.common 第三方的zkweb.system.drawing,都用的是libgdiplus 。是因为CentOS的libgdiplus包不是用pango编译的,libgdiplus仅使用Cairo字体渲染进行编译,出现了一种异常情况导致无法渲染。

所以,用libgdiplus源码用pango编译


[root@localhost ~]# yum install -y autoconf automake libtool
[root@localhost ~]# yum install -y freetype-devel fontconfig libXft-devel
[root@localhost ~]# yum install -y libjpeg-turbo-devel libpng-devel giflib-devel libtiff-devel libexif-devel
[root@localhost ~]# yum install -y glib2-devel
[root@localhost ~]# yum install -y pango-devel
[root@localhost ~]# yum install -y giflib
[root@localhost ~]# yum install -y libexif
[root@localhost ~]# git clone https://github.com/mono/libgdiplus
正克隆到 'libgdiplus'...
remote: Enumerating objects: 14112, done.
remote: Counting objects: 100% (70/70), done.
remote: Compressing objects: 100% (49/49), done.
remote: Total 14112 (delta 33), reused 40 (delta 21), pack-reused 14042
接收对象中: 100% (14112/14112), 14.51 MiB | 407.00 KiB/s, done.
处理 delta 中: 100% (10345/10345), done.
[root@localhost ~]# cd libgdiplus
[root@localhost libgdiplus]# ls
AUTHORS     CODE-OF-CONDUCT.md  docs      libgdiplus0.spec.in  LICENSE      README.md  TODO
autogen.sh  configure.ac        external  libgdiplus.pc.in     Makefile.am  src        update_submodules.sh
ChangeLog   COPYING             INSTALL   libgdiplus.sln       NEWS         tests      winconfig.h.in
[root@localhost libgdiplus]# chmod +x autogen.sh
[root@localhost libgdiplus]# ./autogen.sh  --with-pango
Running libtoolize...
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
Running aclocal  ...
Running autoheader...
Running automake --gnu  ...
configure.ac:6: installing './config.guess'
configure.ac:6: installing './config.sub'
configure.ac:9: installing './install-sh'
configure.ac:9: installing './missing'
src/Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
Running autoconf ...
Running ./configure --enable-maintainer-mode --with-pango ...
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '0' is supported by ustar format... yes
checking whether GID '0' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking how to print strings... printf
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether make supports nested variables... (cached) yes
checking whether byte ordering is bigendian... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for BASE_DEPENDENCIES... yes
checking for cmake... no
configure: WARNING: *** cmake not found, won't build googletest-based tests.
checking for CAIRO... yes
checking for PANGO... yes
checking for FONTCONFIG... yes
checking for FcInit in -lfontconfig... yes
checking for FcFini... yes
checking for FREETYPE2... yes
checking byteswap.h usability... yes
checking byteswap.h presence... yes
checking for byteswap.h... yes
checking for library containing sqrt... -lm
checking host threading settings... checking for pthread_create in -lpthread... yes
checking if compiler recognizes -pthread... yes
checking for sigsetjmp... yes
checking for visibility __attribute__... yes
checking for jpeg_destroy_decompress in -ljpeg... yes
checking for jpeglib.h... yes
checking for TIFFReadScanline in -ltiff... yes
checking tiffio.h usability... yes
checking tiffio.h presence... yes
checking for tiffio.h... yes
checking for DGifOpenFileName in -lgif... yes
checking gif_lib.h usability... yes
checking gif_lib.h presence... yes
checking for gif_lib.h... yes
checking for DGifOpenFileName in -lungif... no
configure: WARNING: *** GIF loader will not be built (ungiflibrary not found) ***
checking for libpng16... no
checking for libpng14... no
checking for libpng12... no
checking for png... checking for png_read_info in -lpng... yes
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking for png_structp in png.h... yes
checking X11 support... yes
checking for LIBEXIF... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libgdiplus.pc
config.status: creating libgdiplus0.spec
config.status: creating src/Makefile
config.status: creating tests/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
---
Configuration summary

   * Installation prefix = /usr/local
   * Cairo = 1.15.12 (system)
   * Text = pango
   * EXIF tags = yes
   * X11 = yes
   * Codecs supported:

      - TIFF: yes
      - JPEG: yes
      - GIF: yes
      - PNG: yes

      NOTE: if any of the above say 'no' you may install the
            corresponding development packages for them, rerun
            autogen.sh to include them in the build.

---
Now type `make' to compile
[root@localhost libgdiplus]# make
正克隆到 'external/googletest'...
remote: Enumerating objects: 23530, done.
remote: Total 23530 (delta 0), reused 0 (delta 0), pack-reused 23530
接收对象中: 100% (23530/23530), 9.29 MiB | 1.15 MiB/s, done.
处理 delta 中: 100% (17382/17382), done.
子模组路径 'external/googletest':检出 '703bd9caab50b139428cea1aaff9974ebee5742e'
Git submodules updated successfully
make  all-recursive
make[1]: 进入目录“/root/libgdiplus”
Making all in src
make[2]: 进入目录“/root/libgdiplus/src”
  CC       adjustablearrowcap.lo
  CC       bitmap.lo
  CC       brush.lo
  CC       carbon-private.lo
  CC       customlinecap.lo
  CC       dstream.lo
  CC       font.lo
  CC       gdi32.lo
  CC       general.lo
  CC       graphics.lo
  CC       graphics-cairo.lo
  CC       graphics-metafile.lo
  CC       graphics-path.lo
  CC       graphics-pathiterator.lo
  CC       hatchbrush.lo
  CC       icocodec.lo
  CC       image.lo
  CC       imageattributes.lo
  CC       lineargradientbrush.lo
  CC       matrix.lo
  CC       metafile.lo
  CC       pathgradientbrush.lo
  CC       pen.lo
  CC       print.lo
  CC       region.lo
  CC       region-bitmap.lo
  CC       region-path-tree.lo
  CC       solidbrush.lo
  CC       stringformat.lo
  CC       text.lo
  CC       text-metafile.lo
  CC       texturebrush.lo
  CC       bmpcodec.lo
  CC       emfcodec.lo
  CC       emfplus.lo
  CC       gifcodec.lo
  CC       jpegcodec.lo
  CC       pngcodec.lo
  CC       tiffcodec.lo
  CC       wmfcodec.lo
  CC       text-pango.lo
  CCLD     libgdiplus.la
make[2]: 离开目录“/root/libgdiplus/src”
Making all in tests
make[2]: 进入目录“/root/libgdiplus/tests”
  CC       testadjustablearrowcap.o
  CCLD     testadjustablearrowcap
  CC       testbitmap.o
  CCLD     testbitmap
  CC       testbits.o
  CCLD     testbits
  CC       testbmpcodec.o
  CCLD     testbmpcodec
  CC       testbrush.o
  CCLD     testbrush
  CC       testclip.o
  CCLD     testclip
  CC       testcodecs.o
  CCLD     testcodecs
  CC       testcustomlinecap.o
  CCLD     testcustomlinecap
  CC       testemfcodec.o
  CCLD     testemfcodec
  CC       testfont.o
  CCLD     testfont
  CC       testgeneral.o
  CCLD     testgeneral
  CC       testgifcodec.o
  CCLD     testgifcodec
  CC       testgpimage.o
  CCLD     testgpimage
  CC       testgraphics.o
  CCLD     testgraphics
  CC       testgraphicsdraw.o
  CCLD     testgraphicsdraw
  CC       testgraphicsfill.o
  CCLD     testgraphicsfill
  CC       testgraphicspath.o
  CCLD     testgraphicspath
  CC       testhatchbrush.o
  CCLD     testhatchbrush
  CC       testicocodec.o
  CCLD     testicocodec
  CC       testimageattributes.o
  CCLD     testimageattributes
  CC       testlineargradientbrush.o
  CCLD     testlineargradientbrush
  CC       testmatrix.o
  CCLD     testmatrix
  CC       testmetafile.o
  CCLD     testmetafile
  CC       testpathgradientbrush.o
  CCLD     testpathgradientbrush
  CC       testpen.o
  CCLD     testpen
  CC       testpng.o
  CCLD     testpng
  CC       testpngcodec.o
  CCLD     testpngcodec
  CC       testregion.o
  CCLD     testregion
  CC       testreversepath.o
  CCLD     testreversepath
  CC       testsolidbrush.o
  CCLD     testsolidbrush
  CC       teststringformat.o
  CCLD     teststringformat
  CC       testtext.o
  CCLD     testtext
  CC       testtexturebrush.o
  CCLD     testtexturebrush
  CC       testwmfcodec.o
  CCLD     testwmfcodec
  CC       testjpegcodec.o
  CCLD     testjpegcodec
  CC       testtiffcodec.o
  CCLD     testtiffcodec
make[2]: 离开目录“/root/libgdiplus/tests”
make[2]: 进入目录“/root/libgdiplus”
make[2]: 离开目录“/root/libgdiplus”
make[1]: 离开目录“/root/libgdiplus”
[root@localhost libgdiplus]# ll
总用量 1552
-rw-r--r--. 1 root root  47563 12月 15 14:41 aclocal.m4
-rw-r--r--. 1 root root    203 12月 15 14:40 AUTHORS
-rwxr-xr-x. 1 root root   3965 12月 15 14:40 autogen.sh
drwxr-xr-x. 2 root root    118 12月 15 14:41 autom4te.cache
-rw-r--r--. 1 root root     38 12月 15 14:40 ChangeLog
-rw-r--r--. 1 root root    259 12月 15 14:40 CODE-OF-CONDUCT.md
lrwxrwxrwx. 1 root root     37 12月 15 14:41 config.guess -> /usr/share/automake-1.13/config.guess
-rw-r--r--. 1 root root   3597 12月 15 14:41 config.h
-rw-r--r--. 1 root root   3272 12月 15 14:41 config.h.in
-rw-r--r--. 1 root root  46699 12月 15 14:41 config.log
-rwxr-xr-x. 1 root root  75112 12月 15 14:41 config.status
lrwxrwxrwx. 1 root root     35 12月 15 14:41 config.sub -> /usr/share/automake-1.13/config.sub
-rwxr-xr-x. 1 root root 629045 12月 15 14:41 configure
-rw-r--r--. 1 root root  16359 12月 15 14:40 configure.ac
-rw-r--r--. 1 root root     67 12月 15 14:40 COPYING
lrwxrwxrwx. 1 root root     32 12月 15 14:41 depcomp -> /usr/share/automake-1.13/depcomp
drwxr-xr-x. 2 root root     37 12月 15 14:40 docs
drwxr-xr-x. 3 root root     24 12月 15 14:46 external
-rw-r--r--. 1 root root   9498 12月 15 14:40 INSTALL
lrwxrwxrwx. 1 root root     35 12月 15 14:41 install-sh -> /usr/share/automake-1.13/install-sh
-rw-r--r--. 1 root root   1558 12月 15 14:41 libgdiplus0.spec
-rw-r--r--. 1 root root   1564 12月 15 14:40 libgdiplus0.spec.in
-rw-r--r--. 1 root root   1146 12月 15 14:41 libgdiplus.pc
-rw-r--r--. 1 root root    288 12月 15 14:40 libgdiplus.pc.in
-rw-r--r--. 1 root root   1293 12月 15 14:40 libgdiplus.sln
-rwxr-xr-x. 1 root root 298766 12月 15 14:41 libtool
-rw-r--r--. 1 root root   1033 12月 15 14:40 LICENSE
-rw-r--r--. 1 root root 283474 12月 15 14:41 ltmain.sh
drwxr-xr-x. 2 root root    104 12月 15 14:41 m4
-rw-r--r--. 1 root root  31139 12月 15 14:41 Makefile
-rw-r--r--. 1 root root    404 12月 15 14:40 Makefile.am
-rw-r--r--. 1 root root  28867 12月 15 14:41 Makefile.in
lrwxrwxrwx. 1 root root     32 12月 15 14:41 missing -> /usr/share/automake-1.13/missing
-rw-r--r--. 1 root root     81 12月 15 14:40 NEWS
-rw-r--r--. 1 root root   3042 12月 15 14:40 README.md
drwxr-xr-x. 4 root root   8192 12月 15 14:47 src
-rw-r--r--. 1 root root     23 12月 15 14:41 stamp-h1
lrwxrwxrwx. 1 root root     36 12月 15 14:41 test-driver -> /usr/share/automake-1.13/test-driver
drwxr-xr-x. 4 root root   4096 12月 15 14:48 tests
-rw-r--r--. 1 root root   2193 12月 15 14:40 TODO
-rwxr-xr-x. 1 root root    816 12月 15 14:40 update_submodules.sh
-rw-r--r--. 1 root root    177 12月 15 14:40 winconfig.h.in
[root@localhost libgdiplus]# ll libtool
-rwxr-xr-x. 1 root root 298766 12月 15 14:41 libtool
[root@localhost libgdiplus]# make install
Making install in src
make[1]: 进入目录“/root/libgdiplus/src”
make[2]: 进入目录“/root/libgdiplus/src”
 /usr/bin/mkdir -p '/usr/local/lib'
 /bin/sh ../libtool   --mode=install /usr/bin/install -c   libgdiplus.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libgdiplus.so.0.0.0 /usr/local/lib/libgdiplus.so.0.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libgdiplus.so.0.0.0 libgdiplus.so.0 || { rm -f libgdiplus.so.0 && ln -s libgdiplus.so.0.0.0 libgdiplus.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libgdiplus.so.0.0.0 libgdiplus.so || { rm -f libgdiplus.so && ln -s libgdiplus.so.0.0.0 libgdiplus.so; }; })
libtool: install: /usr/bin/install -c .libs/libgdiplus.lai /usr/local/lib/libgdiplus.la
libtool: install: /usr/bin/install -c .libs/libgdiplus.a /usr/local/lib/libgdiplus.a
libtool: install: chmod 644 /usr/local/lib/libgdiplus.a
libtool: install: ranlib /usr/local/lib/libgdiplus.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[2]: 对“install-data-am”无需做任何事。
make[2]: 离开目录“/root/libgdiplus/src”
make[1]: 离开目录“/root/libgdiplus/src”
Making install in tests
make[1]: 进入目录“/root/libgdiplus/tests”
make[2]: 进入目录“/root/libgdiplus/tests”
make[2]: 对“install-exec-am”无需做任何事。
make[2]: 对“install-data-am”无需做任何事。
make[2]: 离开目录“/root/libgdiplus/tests”
make[1]: 离开目录“/root/libgdiplus/tests”
make[1]: 进入目录“/root/libgdiplus”
make[2]: 进入目录“/root/libgdiplus”
make[2]: 对“install-exec-am”无需做任何事。
 /usr/bin/mkdir -p '/usr/local/lib/pkgconfig'
 /usr/bin/install -c -m 644 libgdiplus.pc '/usr/local/lib/pkgconfig'
make[2]: 离开目录“/root/libgdiplus”
make[1]: 离开目录“/root/libgdiplus”
[root@localhost libgdiplus]# ll
总用量 1552
-rw-r--r--. 1 root root  47563 1215 14:41 aclocal.m4
-rw-r--r--. 1 root root    203 1215 14:40 AUTHORS
-rwxr-xr-x. 1 root root   3965 1215 14:40 autogen.sh
drwxr-xr-x. 2 root root    118 1215 14:41 autom4te.cache
-rw-r--r--. 1 root root     38 1215 14:40 ChangeLog
-rw-r--r--. 1 root root    259 1215 14:40 CODE-OF-CONDUCT.md
lrwxrwxrwx. 1 root root     37 1215 14:41 config.guess -> /usr/share/automake-1.13/config.guess
-rw-r--r--. 1 root root   3597 1215 14:41 config.h
-rw-r--r--. 1 root root   3272 1215 14:41 config.h.in
-rw-r--r--. 1 root root  46699 1215 14:41 config.log
-rwxr-xr-x. 1 root root  75112 1215 14:41 config.status
lrwxrwxrwx. 1 root root     35 1215 14:41 config.sub -> /usr/share/automake-1.13/config.sub
-rwxr-xr-x. 1 root root 629045 1215 14:41 configure
-rw-r--r--. 1 root root  16359 1215 14:40 configure.ac
-rw-r--r--. 1 root root     67 1215 14:40 COPYING
lrwxrwxrwx. 1 root root     32 1215 14:41 depcomp -> /usr/share/automake-1.13/depcomp
drwxr-xr-x. 2 root root     37 1215 14:40 docs
drwxr-xr-x. 3 root root     24 1215 14:46 external
-rw-r--r--. 1 root root   9498 1215 14:40 INSTALL
lrwxrwxrwx. 1 root root     35 1215 14:41 install-sh -> /usr/share/automake-1.13/install-sh
-rw-r--r--. 1 root root   1558 1215 14:41 libgdiplus0.spec
-rw-r--r--. 1 root root   1564 1215 14:40 libgdiplus0.spec.in
-rw-r--r--. 1 root root   1146 1215 14:41 libgdiplus.pc
-rw-r--r--. 1 root root    288 1215 14:40 libgdiplus.pc.in
-rw-r--r--. 1 root root   1293 1215 14:40 libgdiplus.sln
-rwxr-xr-x. 1 root root 298766 1215 14:41 libtool
-rw-r--r--. 1 root root   1033 1215 14:40 LICENSE
-rw-r--r--. 1 root root 283474 1215 14:41 ltmain.sh
drwxr-xr-x. 2 root root    104 1215 14:41 m4
-rw-r--r--. 1 root root  31139 1215 14:41 Makefile
-rw-r--r--. 1 root root    404 1215 14:40 Makefile.am
-rw-r--r--. 1 root root  28867 1215 14:41 Makefile.in
lrwxrwxrwx. 1 root root     32 1215 14:41 missing -> /usr/share/automake-1.13/missing
-rw-r--r--. 1 root root     81 1215 14:40 NEWS
-rw-r--r--. 1 root root   3042 1215 14:40 README.md
drwxr-xr-x. 4 root root   8192 1215 14:47 src
-rw-r--r--. 1 root root     23 1215 14:41 stamp-h1
lrwxrwxrwx. 1 root root     36 1215 14:41 test-driver -> /usr/share/automake-1.13/test-driver
drwxr-xr-x. 4 root root   4096 1215 14:48 tests
-rw-r--r--. 1 root root   2193 1215 14:40 TODO
-rwxr-xr-x. 1 root root    816 1215 14:40 update_submodules.sh
-rw-r--r--. 1 root root    177 1215 14:40 winconfig.h.in
[root@localhost libgdiplus]# ll -a
总用量 1576
drwxr-xr-x. 10 root root   4096 1215 14:41 .
dr-xr-x---.  5 root root    188 1215 14:40 ..
-rw-r--r--.  1 root root  47563 1215 14:41 aclocal.m4
-rw-r--r--.  1 root root    203 1215 14:40 AUTHORS
-rwxr-xr-x.  1 root root   3965 1215 14:40 autogen.sh
drwxr-xr-x.  2 root root    118 1215 14:41 autom4te.cache
-rw-r--r--.  1 root root   5712 1215 14:40 .azure-pipelines.yml
-rw-r--r--.  1 root root     38 1215 14:40 ChangeLog
-rw-r--r--.  1 root root    259 1215 14:40 CODE-OF-CONDUCT.md
lrwxrwxrwx.  1 root root     37 1215 14:41 config.guess -> /usr/share/automake-1.13/config.guess
-rw-r--r--.  1 root root   3597 1215 14:41 config.h
-rw-r--r--.  1 root root   3272 1215 14:41 config.h.in
-rw-r--r--.  1 root root  46699 1215 14:41 config.log
-rwxr-xr-x.  1 root root  75112 1215 14:41 config.status
lrwxrwxrwx.  1 root root     35 1215 14:41 config.sub -> /usr/share/automake-1.13/config.sub
-rwxr-xr-x.  1 root root 629045 1215 14:41 configure
-rw-r--r--.  1 root root  16359 1215 14:40 configure.ac
-rw-r--r--.  1 root root     67 1215 14:40 COPYING
lrwxrwxrwx.  1 root root     32 1215 14:41 depcomp -> /usr/share/automake-1.13/depcomp
drwxr-xr-x.  2 root root     37 1215 14:40 docs
drwxr-xr-x.  3 root root     24 1215 14:46 external
drwxr-xr-x.  9 root root    178 1215 14:41 .git
-rw-r--r--.  1 root root     42 1215 14:40 .gitattributes
-rw-r--r--.  1 root root   1229 1215 14:40 .gitignore
-rw-r--r--.  1 root root    127 1215 14:40 .gitmodules
-rw-r--r--.  1 root root   9498 1215 14:40 INSTALL
lrwxrwxrwx.  1 root root     35 1215 14:41 install-sh -> /usr/share/automake-1.13/install-sh
-rw-r--r--.  1 root root   1558 1215 14:41 libgdiplus0.spec
-rw-r--r--.  1 root root   1564 1215 14:40 libgdiplus0.spec.in
-rw-r--r--.  1 root root   1146 1215 14:41 libgdiplus.pc
-rw-r--r--.  1 root root    288 1215 14:40 libgdiplus.pc.in
-rw-r--r--.  1 root root   1293 1215 14:40 libgdiplus.sln
-rwxr-xr-x.  1 root root 298766 1215 14:41 libtool
-rw-r--r--.  1 root root   1033 1215 14:40 LICENSE
-rw-r--r--.  1 root root 283474 1215 14:41 ltmain.sh
drwxr-xr-x.  2 root root    104 1215 14:41 m4
-rw-r--r--.  1 root root  31139 1215 14:41 Makefile
-rw-r--r--.  1 root root    404 1215 14:40 Makefile.am
-rw-r--r--.  1 root root  28867 1215 14:41 Makefile.in
lrwxrwxrwx.  1 root root     32 1215 14:41 missing -> /usr/share/automake-1.13/missing
-rw-r--r--.  1 root root     81 1215 14:40 NEWS
-rw-r--r--.  1 root root   3042 1215 14:40 README.md
drwxr-xr-x.  4 root root   8192 1215 14:47 src
-rw-r--r--.  1 root root     23 1215 14:41 stamp-h1
lrwxrwxrwx.  1 root root     36 1215 14:41 test-driver -> /usr/share/automake-1.13/test-driver
drwxr-xr-x.  4 root root   4096 1215 14:48 tests
-rw-r--r--.  1 root root   2193 1215 14:40 TODO
-rwxr-xr-x.  1 root root    816 1215 14:40 update_submodules.sh
drwxr-xr-x.  2 root root     64 1215 14:40 .vscode
-rw-r--r--.  1 root root    177 1215 14:40 winconfig.h.in
[root@localhost libgdiplus]# pwd
/root/libgdiplus
[root@localhost libgdiplus]# Connection closing...Socket close.

Connection closed by foreign host.

Disconnected from remote host(CentOS7) at 16:24:11.

编译后会在/src/.libs下生成动态库。
在这里插入图片描述

把里面文件拷贝到lib文件夹,在lib同级放以下脚本的shell名字叫install.sh

#!/bin/bash
#shell一键安装gdiplus
#20211215
#zlz
#----------------------------------------------------------
mypath=$(dirname $0)
mkdir /usr/share/libgdiplus
cp -r ${mypath}/libs/*  /usr/share/libgdiplus/
cd /usr/lib64/
rm -f libgdiplus.so
chmod +x /usr/share/libgdiplus/libgdiplus.so
ln -s /usr/share/libgdiplus/libgdiplus.so libgdiplus.so
echo "安装libgdiplus完成"

在这里插入图片描述

然后上传到centos下执行install.sh脚本完成新编译的libgdiplus安装。安装完成后重启asp.netcore网站生效。

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小乌鱼

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值