婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > CentOS7下編譯安裝Mapnik Mapnik編譯教程

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

熱門標簽:小藍鴿電話機器人 阿克蘇市地圖標注app 京東外呼系統怎么操作 ai人工電話機器人 河北機器人電銷 長沙人工外呼系統公司 bs外呼系統 上海營銷外呼系統定制 常州云呼叫外呼系統

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++)的內存,對于小內存的用戶(我當時只有2G)可能會出現內存不夠而異常退出的情況,如果出現以下狀況而退出的話:

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

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

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

sudo mkswap /swapfile 

sudo swapon /swapfile 

然后在編譯完成后,在恢復到之前的狀態

sudo swapoff /swapfile 

sudo rm /swapfile 

開始編譯

./configure 

make 

make install 

中間會出現錯誤如:

編譯一下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 

如果出現類似的錯誤

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 

添加一行內容: /usr/local/lib

然后保存退出,同時執行一下

ldconfig 

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

python demo/python/rundemo.py

標簽:邢臺 泉州 周口 來賓 甘孜 銅仁 忻州 甘南

巨人網絡通訊聲明:本文標題《CentOS7下編譯安裝Mapnik Mapnik編譯教程》,本文關鍵詞  CentOS7,下,編譯,安裝,Mapnik,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《CentOS7下編譯安裝Mapnik Mapnik編譯教程》相關的同類信息!
  • 本頁收集關于CentOS7下編譯安裝Mapnik Mapnik編譯教程的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 神木县| 宜章县| 太原市| 壶关县| 寻甸| 衡水市| 宜章县| 安塞县| 襄垣县| 无棣县| 紫云| 曲松县| 武胜县| 定结县| 靖西县| 平潭县| 辛集市| 乌拉特中旗| 衢州市| 绥化市| 伊春市| 滨海县| 普宁市| 通州区| 南丰县| 滨州市| 长乐市| 礼泉县| 高青县| 曲阜市| 梁河县| 松桃| 海城市| 南和县| 嵊泗县| 渝中区| 长阳| 都兰县| 大田县| 绍兴市| 长丰县|