时间:2021-05-25
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... 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/0.9.35_1/include/harfbuzz -L/usr/local/Cellar/harfbuzz/0.9.35_1/lib -lharfbuzzwhat 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声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
关于GCC在CentOS下通过yum安装默认版本号,CentOS5是4.1.2;CentOS6是4.4.7;CentOS7是4.8.3。很多时候在编译安装软件都
Ubuntu系统操作中,因为开发Gis应用程序的需要,要在Ubuntu系统中安装Mapnik工具包,那么要如何安装Mapnik工具包呢?下面小编就给大家介绍
简介在CentOS7上默认的Python版本还是python2,如果需要Python3就需要安装第三方源,或者使用源码安装。安装编译工具和依赖包yum-yins
CentOS7下安装telnet服务的实现方法今天搞了下Centos7下面升级openssl和openssh,顺便装了下telnet#安装telnet避免ssh
centos7安装MariaDB教程,分享给大家1.centos7现状: 新系统无法再使用yuminstallmysql-server来安装mysql,因为已