最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

CentOS7下編譯安裝Mapnik Mapnik編譯教程

  發(fā)布時間:2016-11-28 14:46:41   作者:佚名   我要評論
本文為大家具體的介紹如何在CentOS7系統(tǒng)下編譯安裝Mapnik?小編這里使用的是Master版本,Master版本需要glibc2.14+的支持,一起來看看吧

InstallationTroubleshooting 編譯安裝遇到問題匯總

git clone https://github.com/mapnik/mapnik.git 

安裝必要的依賴

yum install boost-devel postgresql-devel proj-devel proj-epsg 

擴展需要的依賴

yum install sqlite-devel libpng-devel libtiff-devel libjpeg-devel libicu-devel 

編譯的時候,官方需求最少要有5GB(for g++)的內(nèi)存,對于小內(nèi)存的用戶(我當時只有2G)可能會出現(xiàn)內(nèi)存不夠而異常退出的情況,如果出現(xiàn)以下狀況而退出的話:

g++: internal compiler error: Killed (program cc1plus) 

我們可以臨時增加磁盤交換空間來臨時解決該問題

sudo dd if=/dev/zero of=/swapfile bs=64M count=16 

sudo mkswap /swapfile 

sudo swapon /swapfile 

然后在編譯完成后,在恢復(fù)到之前的狀態(tài)

sudo swapoff /swapfile 

sudo rm /swapfile 

開始編譯

./configure 

make 

make install 

中間會出現(xiàn)錯誤如:

編譯一下harfbuzz 參照如下修改

Harfbuzz not found

$ brew install harfbuzz
...
$ ./configure
...
Checking for C++ library harfbuzz... no
Could not find required header or shared library for harfbuzz
...
Exiting... the following required dependencies were not found:
 - harfbuzz (HarfBuzz text shaping library | configure with HB_LIBS & HB_INCLUDES)

Solution: HB_LIBS and HB_INCLUDES are directories, not cflags/ldflags, and HB_INCLUDES needs not to include the “harfbuzz” directory itself. If pkg-config says:

$ pkg-config --libs --cflags harfbuzz 

-I/usr/local/Cellar/harfbuzz/0.9.35_1/include/harfbuzz -L/usr/local/Cellar/harfbuzz/0.9.35_1/lib -lharfbuzz 

what you actually need is 修改配置文件為,直接指定HB_LIBS,HB_INCLUDES

$ ./configure HB_LIBS=/usr/local/Cellar/harfbuzz/0.9.35_1/lib HB_INCLUDES=/usr/local/Cellar/harfbuzz/0.9.35_1/include 

簡單測試

python import mapnik 

如果出現(xiàn)類似的錯誤

ImportError: libmapnik.so.3.0: cannot open shared object file: No such file or directory 

需要手工添加一下so的位置

vim /etc/ld.so.conf.d/mapnik-x86_64.conf 

添加一行內(nèi)容: /usr/local/lib

然后保存退出,同時執(zhí)行一下

ldconfig 

如果沒有問題的話可以試一下渲染demo,會生成一些不同品質(zhì)不同格式的圖片demo文件

python demo/python/rundemo.py

相關(guān)文章

最新評論

凤台县| 盈江县| 剑川县| 河间市| 中宁县| 连江县| 铜陵市| 陆丰市| 桦川县| 盐城市| 广德县| 依兰县| 大名县| 马尔康县| 桃源县| 克拉玛依市| 济源市| 惠安县| 蒙自县| 靖宇县| 五原县| 土默特左旗| 庆安县| 阿合奇县| 新龙县| 静安区| 渑池县| 甘德县| 波密县| 砀山县| 邢台市| 双柏县| 鄯善县| 安福县| 安西县| 灵石县| 鄂伦春自治旗| 杨浦区| 宜良县| 南投县| 阿荣旗|