QGis 中标麒麟安装

1.QGIS源码下载[下载地址]

2.QGis编译依赖资源

所需的构建工具:

    1.CMake >= 3.12.0下载

安装配置:

tar -xzvf  cmake-3.28.0-rc1-linux-x86_64.tar.gz

mv cmake-3.28.0-rc1-linux-x86_64 /opt/cmake
ln -sf /opt/cmake/bin/*  /usr/bin/

查看是否成功

cmake --version

    2.Flex >= 2.5.6下载

安装配置:

tar -xzvf flex-2.6.4.tar.gz 
cd flex-2.6.4                
./configure
make
make install

查看是否成功

flex --version

    3.Bison> = 2.4下载

安装配置:

tar -xzvf bison-2.3.tar.gz
cd bison-2.3              
./configure
make
make install

查看是否成功

bison --version

  4.Python >= 3.7下载

安装配置:

tar -zxvf Python-3.12.0.tgz
mkdir /usr/local/Python37
cd Python-3.12.0
./configure --prefix=/usr/local/python37
make

make install 

    安装时报错ModuleNotFoundError: No module named '_ctypes’的解决办法:
     yum install libffi-devel
创建软连接:

ln -s /usr/local/python37/bin/python3.7 /usr/bin/python37
ln -s /usr/local/python37/bin/pip3.7 /usr/bin/pip37

测试否可用

[root@mini Python-3.7.0]# python3
Python 3.7.0 (default, Jul 28 2018, 22:47:29)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print("hello world!")
hello world!
>>> exit()

所需的构建依赖项:

    1.Qt >= 5.14.0下载

安装配置:

chmod 777 -R ./xxxxx.run

./xxxxx.run
注意需要配置qmake环境。

执行  gedit /etc/profile

在文件末尾添加

export QTDIR=/opt/Qt5.14.2/5.14.2/gcc_64
export PATH=$QTDIR/bin:$PATH
export MANPATH=$QTDIR/man:$MANPATH
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH

执行 source /etc/profile

    2.GEOS >= 3.9下载

安装配置:

tar -xvjf geos-3.12.1.tar.bz2
cd geos-3.12.1              
./configure
make
make install

    3.Sqlite3 >= 3.11下载

安装配置:

解压sqlite-src-3440000.zip 
cd sqlite-src-3440000.                
./configure
make
make install

查看是否成功

sqlite3 -version

 4.Proj >= 7.2.0下载

注:proj 依赖


SQLite3 >= 3.11 (上边已安装)


libtiff >= 4.0 下载

安装配置:

解压 libtiff-master.zip
cd libtiff-master         
cmake .
make
make install

curl >= 7.29.0下载

安装配置:

tar -xvf curl-8.4.0.tar.gz
cd curl-8.4.0            
cmake .
make
make install

安装配置:

tar -xvf proj-9.2.1.tar.gz
cd proj-9.2.1           
cmake .

注:中间会下载 googletest-release-1.11.0.zip ,请将下载好的压缩包重命名成release-1.11.0.zip,并拷贝到 proj-9.2.1/googletest-download/googletest-prefix/src目录下(注意先将文件夹赋权限)
make
make install

查看是否成功

proj -h

如果出现

proj: error while loading shared libraries: libtiff.so.6: cannot open shared object file: No such file or directory

执行以下建立软连接

 ln -s /usr/local/lib/libtiff.so.6 /usr/lib/libtiff.so.6

5.SpatiaLite >= 4.2.0下载

安装配置:

tar -xzvf libspatialite-5.0.0.tar.gz
cd libspatialite-5.0.0         
./configure
make
make install

查看是否成功

bison --version

6.libspatialindex下载

安装配置:

解压 libspatialindex-master.zip
cd libspatialindex-master        
cmake .
make
make install

7.GDAL/OGR >= 3.2.0下载

add-apt-repository ppa:ubuntugis/ppa 
apt-get update
apt-get install gdal-bin
apt-get install libgdal-dev
安装配置:

tar -xzvf gdal-3.8.0.tar.gz
cd gdal-3.8.0       
cmake .
make
make install

查看是否成功

 gdal-config --version

编译出现以下错误

/gdal-3.1.1/.libs/libgdal.so: undefined reference to `sqlite3_column_origin_name'
/gdal-3.1.1/.libs/libgdal.so: undefined reference to `sqlite3_column_table_name'

具体做法是在sqlite3源码文件夹下

cd ./sqlite-autoconf-3320300

gedit  ./sqlite3.c

添加

#define SQLITE_CORE 1
#define SQLITE_AMALGAMATION 1
#ifndef SQLITE_PRIVATE
# define SQLITE_PRIVATE static
#endif
#define SQLITE_ENABLE_COLUMN_METADATA 1

然后重新编译sqlite3

  8.Qwt >= 5.0 & (< 6.1 with internal QwtPolar)下载

安装配置:

解压 qwt-5.2.0.zip
cd qwt-5.2.0      
qmake
make
make install

查看是否成功

qwt --h


  9.expat >= 1.95下载


  10.QScintilla2下载

安装配置:

tar -zxvf QScintilla_gpl-2.11.2.tar.gz
cd QScintilla_gpl-2.11.2/
cd ./Qt4Qt5
qmake qscintilla.pro
make
make install
.....
cd ../Python
python configure.py
make
sudo make install

 11.QCA下载


 12.qtkeychain (>= 0.5)下载


 13.libzip下载

安装配置:

解压 libzip-main.zip 
cd libzip-main               
cmake .
make
make install

查看是否成功

zip -h


10.安装pg Gem时找不到libpq-fe.h头文件***

对于Ubuntu系统:
sudo apt-get install libpq-dev
在Red Hat Linux(RHEL)系统上:
yum install postgresql-devel
对于Mac Homebrew:
brew install postgresql
对于Mac MacPorts PostgreSQL:
gem install pg -- --with-pg-config=/opt/local/lib/postgresql[version number]/bin/pg_config
对于OpenSuse:
zypper in postgresql-devel

12.安装sip (我用的版本是V4.19.14)

下载地址:https://riverbankcomputing.com/software/sip/download

    sip -V检查版本
    tar -zxvf sip-4.19.8.tar.gz   
    python3 configure.py   --sip-module PyQt5.sip  //必须添加这个,否则运行 import PyQt5.Core 会异常
    sudo make  -j8(或者你电脑的核心数)
    sudo make install 

安装完成后,可分别在终端和Python中查验sip版本是否一致

#终端查看sip版本
sip -V
#查看Python调用的sip版本(通过上述编译安装操作得到的)
python
import sip
print(sip.SIP_VERSION_STR)

13.安装PyQt (我用的版本是V4.11.3)

tar zxvf PyQt-gpl-5.3.2.tar.gz
cd PyQt-gpl-5.11.2/
python configure.py –qmake /opt/Qt5.11.1/5.3/gcc_64/bin/qmake –sip-incdir ../sip-4.19.4/siplib //也可以将qmke文件复制
到,/usr/bin/目录下,就不用添加-qmake
make -j4 //建议添加-j 要不然编译会很久
sudo make install

可设置创建软连接:
sudo ln -s /usr/lib/python3.4/site-packages/PyQt5 /usr/lib/python3.4/PyQt5

2.make进行编译

make -j8
make install
3.运行

1)当前目录直接运行
./output/bin/qgis

2)make安装运行
qgis

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
要在Linux上安装QGIS Server,可以按照以下步骤进行操作: 1. 打开QGIS官网页面,找到“下载”菜单,并选择“Stable Release”(稳定版本)或“Current Development”(当前开发版本)。 2. 根据你的Linux系统类型选择对应的软件安装包,并点击下载。你可以使用OSGeo4W在线安装程序或者从下载地址http://download.osgeo.org/osgeo4w/x86_64/release/qgis/qgis-server/下载安装包。 3. 安装QGIS Desktop。QGIS Server软件是随QGIS Desktop一起发布的,因此,在安装QGIS Desktop时,你已经获得了QGIS Server软件。 4. 如果你选择使用OSGeo4W在线安装程序,只需安装qgis-server即可。确保你之前已经安装qgis的桌面应用。 请注意,以上步骤适用于QGIS的当前长期稳定版本QGIS3.10。随着QGIS的更新,这些步骤可能会有所变化,请参考QGIS文档中的QGIS Server模块内容。 #### 引用[.reference_title] - *1* [QGIS Desktop与QGIS Server 下载安装](https://blog.csdn.net/xiechunhua_Blog/article/details/130690918)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* *3* [QGIS Server安装教程](https://blog.csdn.net/xiaozy12/article/details/107982669)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值