Ubuntu Server(Ubuntu 14.04 LTS 64位)安裝libgdiplus2.10.9出錯問題記錄

來源:互聯網
上載者:User

標籤:style   blog   http   color   檔案   問題   

首先下載libgdiplus2.10.9安裝包

wget http://download.mono-project.com/sources/libgdiplus/libgdiplus-2.10.9.tar.bz2tar -jxvf libgdiplus-2.10.9.tar.bz2cd libgdiplus-2.10.9

進入目錄開始configure編譯

./configure --prefix=/usr
make

將libgdiplus安裝在/usr目錄下

發現在該作業系統報錯了:如下

gdiplus-private.h:33:31: fatal error: freetype/tttables.h: No such file or directory #include <freetype/tttables.h>                               ^compilation terminated.make[2]: *** [adjustablearrowcap.lo] Error 1make[2]: Leaving directory `/root/libgdiplus-2.10/src‘make[1]: *** [all-recursive] Error 1make[1]: Leaving directory `/root/libgdiplus-2.10‘make: *** [all] Error 2[email protected]:~/libgdiplus-2.10# sudo ln -s /usr/X11/include/freetype2/freetype/ /usr/X11/include/freetypeln: failed to create symbolic link ‘/usr/X11/include/freetype’: No such file or directory

這個錯誤就是說建立/usr/X11/include/freetype連結失敗了,因為找不到freetype

我們開啟/usr/include看有沒有freetype這個目錄,沒有吧,但是我們找到了freetype2,這樣我們做個連結吧

ln -s /usr/include/freetype2 /usr/include/freetype

然後繼續make發現錯誤如下:

/usr/lib64/libglib-2.0.so.0: could not read symbols: Invalid operationcollect2: error: ld returned 1 exit statusmake[2]: *** [testgdi] Error 1make[2]: Leaving directory `/usr/local/src/libgdiplus-2.10.9/tests‘make[1]: *** [all-recursive] Error 1make[1]: Leaving directory `/usr/local/src/libgdiplus-2.10.9‘make: *** [all] Error 2

解決方案來自:http://beginor.github.io/2013/10/15/install-and-config-mono-on-ubuntu-server.html

先執行 ./configure 命令, 然後編輯 test/Makefile 檔案;將 130 行的 LIBS = -lpthread -lfontconfig 改為 LIBS = -lpthread -lfontconfig -lglib-2.0 -lX11;再次執行 make 命令即可。

再次make,是不是很快成功了,ok,make install吧

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.