国产宅男网站在线|亚洲A级性爱免费视频|亚洲中精品级在线|午夜福利AA毛

  • <dd id="gf5jf"><th id="gf5jf"></th></dd>

    <cite id="gf5jf"><label id="gf5jf"></label></cite>
  • <div id="gf5jf"><listing id="gf5jf"></listing></div>
    學(xué)習(xí)啦>學(xué)習(xí)電腦>操作系統(tǒng)>Linux教程>

    如何在Ubuntu中安裝Mapnik工具包

    時(shí)間: 孫勝652 分享

      Ubuntu系統(tǒng)操作中,因?yàn)殚_發(fā)Gis應(yīng)用程序的需要,要在Ubuntu系統(tǒng)中安裝Mapnik工具包,那么要如何安裝Mapnik工具包呢?下面學(xué)習(xí)啦小編就給大家介紹下Ubuntu安裝Mapnik工具包的步驟,感興趣的朋友可以來了解下。

      卸載舊的:

      sudo apt-get purge libmapnik* mapnik-utils python-mapnik

      設(shè)置:

      sudo apt-get install /

      libboost-filesystem-dev /

      libboost-program-options-dev /

      libboost-python-dev libboost-regex-dev /

      libboost-system-dev libboost-thread-dev /

      # get a build environment going.。。

      sudo apt-get install /

      libicu-dev /

      python-dev libxml2 libxml2-dev /

      libfreetype6 libfreetype6-dev /

      libjpeg-dev /

      libpng-dev /

      libproj-dev /

      libtiff-dev /

      libcairo2 libcairo2-dev python-cairo python-cairo-dev /

      libcairomm-1.0-1 libcairomm-1.0-dev /

      ttf-unifont ttf-dejavu ttf-dejavu-core ttf-dejavu-extra /

      git build-essential python-nose /

      libgdal1-dev python-gdal /

      postgresql-9.3 postgresql-server-dev-9.3 postgresql-contrib-9.3 postgresql-9.3-postgis-2.1 /

      libsqlite3-dev

      上面的需要注意:由于用的是ubuntu 14.04的,所以,postgresql相關(guān)的版本變成9.3的了。

      配置、編譯鏈接、安裝:

      # For the development branch:

      git clone https://github.com/mapnik/mapnik mapnik-2.3.x -b 2.3.x

      cd mapnik-2.3.x

      。/configure && make && sudo make install

      其中make的過程很久,要40分鐘左右。。。。

      之前遇到了ternal compiler error :killed (program cc1plus)的錯(cuò)誤

      網(wǎng)上查了以后,有人說是內(nèi)存不夠,我的內(nèi)存當(dāng)時(shí)配置是512M,改為了2g。

      再運(yùn)行make,結(jié)果出錯(cuò):

      vitrual memory exhausted cannot allocate memory

      看到這個(gè)錯(cuò)誤,多少還有點(diǎn)感覺,內(nèi)存不夠可以加。不過我沒有再加,而是再次運(yùn)行make,然后make一路執(zhí)行正常。剩下的make install也沒有問題。

      敲入指令看有沒有安裝成功:

      mapnik-config -v

      輸出了我的版本號(hào):2.3.0-pre

      上面就是Ubuntu安裝Mapnik工具包的方法介紹了,在安裝的時(shí)候要現(xiàn)將舊的卸載,安裝完后可使用mapnik-config -v指令檢測(cè)是否安裝成功。

    317682