瀏覽量:70次
InstallationTroubleshooting 編譯安裝遇到問題匯總
git clone安裝必要的依賴
yum install boost-devel postgresql-devel proj-devel proj-epsg擴(kuò)展需要的依賴
yum install sqlite-devel libpng-devel libtiff-devel libjpeg-devel libicu-devel編譯的時候,官方需求最少要有5GB(for g++)的內(nèi)存,對于小內(nèi)存的用戶(我當(dāng)時只有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... noCould 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/what you actually need is 修改配置文件為,直接指定HB_LIBS,HB_INCLUDES
$ ./configure HB_LIBS=/usr/local/Cellar/harfbuzz/簡單測試
python import mapnik如果出現(xiàn)類似的錯誤
ImportError: : cannot open shared object file: No such file or directory需要手工添加一下so的位置
vim /etc/添加一行內(nèi)容: /usr/local/lib
然后保存退出,同時執(zhí)行一下
ldconfig如果沒有問題的話可以試一下渲染demo,會生成一些不同品質(zhì)不同格式的圖片demo文件
python demo/python/[聲明]本網(wǎng)轉(zhuǎn)載網(wǎng)絡(luò)媒體稿件是為了傳播更多的信息,此類稿件不代表本網(wǎng)觀點(diǎn),本網(wǎng)不承擔(dān)此類稿件侵權(quán)行為的連帶責(zé)任。故此,如果您發(fā)現(xiàn)本網(wǎng)站的內(nèi)容侵犯了您的版權(quán),請您的相關(guān)內(nèi)容發(fā)至此郵箱【779898168@qq.com】,我們在確認(rèn)后,會立即刪除,保證您的版權(quán)。
官網(wǎng)優(yōu)化
整站優(yōu)化
渠道代理
400-655-5776