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
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
P70系列延期,华为新旗舰将在下月发布
3月20日消息,近期博主@数码闲聊站 透露,原定三月份发布的华为新旗舰P70系列延期发布,预计4月份上市。
而博主@定焦数码 爆料,华为的P70系列在定位上已经超过了Mate60,成为了重要的旗舰系列之一。它肩负着重返影像领域顶尖的使命。那么这次P70会带来哪些令人惊艳的创新呢?
根据目前爆料的消息来看,华为P70系列将推出三个版本,其中P70和P70 Pro采用了三角形的摄像头模组设计,而P70 Art则采用了与上一代P60 Art相似的不规则形状设计。这样的外观是否好看见仁见智,但辨识度绝对拉满。
更新日志
- 《原神》「星路拾忆」网页活动壁纸展示
- 群星.2024-祝你幸福!电影原声带【阿里巴巴】【FLAC分轨】
- 于台烟.2004-执着【乾坤唱片】【WAV+CUE】
- 黄品源.2004-感谢·情人(引进版)【滚石】【WAV+CUE】
- 《最终幻想16》评测:游、戏两难全的系列转折
- 《纸嫁衣》五部打包¥104,《鬼泣5》仅需¥44
- 《崩坏:星穹铁道》造物大赛卷出新高度
- 《王菲 菲常传奇 2CD》[WAV+CUE][950MB]
- 《王菲 空灵独味唱腔 非常传奇 紫水晶2CD》[WAV+CUE][860MB]
- 《车载专业测试王1号 极品音质》[WAV/分轨][980MB]
- 炉石传说的国服回归送什么奖励 炉石传说9.25回归最新消息介绍
- 云顶之弈最强阵容汇总2024 云顶之弈最强阵容搭配最新版本
- S14lol全球总决赛在哪观看 lol全球总决赛观赛直播地址汇总
- 黄思婷2011-感谢天[豪记唱片][WAV+CUE]
- 孙淑媚2013-太阳[台湾首版][WAV+CUE]