[problem help] qgis无法安装
Tofloor
poster avatar
lq
deepin
2024-07-21 09:02
Author

试了很多版本,星火商店的书虫版本能安装上用不了

官网和下载deebia 对应版本包都是依赖不满足

Reply Favorite View the author
All Replies
lq
deepin
2024-07-21 09:11
#1

2443154285.jpg

下载对应debian的sid版本也是依赖不满足,坑死

Reply View the author
MeGusta
deepin
2024-07-21 13:16
#2

即便是UBUNTU环境下,也不是这样安装QGIS的啊...

使用ACE兼容环境安装QGIS:

#! /bin/bash
# ==================安装ACE-Bookworm兼容环境=============

# 检查包是否已安装  
if ! dpkg -l | grep -q "^ii  cn.flamescion.bookworm-compatibility-mode"; then  
    # 如果未安装,则安装  
    echo "ACE-Bookworm兼容环境未安装,开始安装..."  
    sudo apt update
    sudo apt install cn.flamescion.bookworm-compatibility-mode  -y
    echo "ACE-Bookworm兼容环境已安装"  
else  
    echo "ACE-Bookworm兼容环境已安装"  
fi

# ==================安装QGIS-LTR=============

# 使用wget命令下载QGIS的公钥到/etc/apt/keyrings/目录下,如果下载失败,脚本将退出
sudo bookworm-run wget -O /etc/apt/keyrings/qgis-archive-keyring.gpg https://download.qgis.org/downloads/qgis-archive-keyring.gpg || exit 1

# 在/tmp目录下,创建一个名为qgis.sources的文件,包含QGIS的apt源信息
cat << EOF > /tmp/qgis.sources
Types: deb deb-src
URIs: https://qgis.org/debian-ltr
Suites: bookworm
Architectures: amd64
Components: main
Signed-By: /etc/apt/keyrings/qgis-archive-keyring.gpg
EOF

# 将刚才创建的qgis.sources文件复制到/etc/apt/sources.list.d/目录下,复制完毕删除/tmp/qgis.sources
sudo bookworm-run cp /tmp/qgis.sources /etc/apt/sources.list.d/qgis.sources && rm /tmp/qgis.sources

# 更新apt的软件源信息,然后安装qgis、fcitx5(fcitx5解决QGIS中文无法输入的问题)
sudo bookworm-run apt update && sudo bookworm-run apt install -f qgis fcitx5 -y
Reply View the author
MeGusta
deepin
2024-07-21 13:42
#3

另外,QGIS默认的图标会被系统主题图标覆盖,这是解决方法:

#! /bin/bash

# ==================处理QGIS文件关联及图标问题=============

# ++++++++++++++++++禁用bloom主题默认的qgis文件图标++++++++++++++++++
 
DSG_DIR="/usr/share/dsg/icons/bloom"
BLOOM_DIR="/usr/share/icons/bloom"
  
# 检查$BLOOM_DIR变量是否为空  
if [ -z "$BLOOM_DIR" ]; then  
    echo -e "\033[31m变量BLOOM_DIR $BLOOM_DIR 为空,终止操作,按任意键退出...\033[0m"  
    read -n 1  
    exit 1
fi  

# 检查$DSG_DIR变量是否为空  
if [ -z "$DSG_DIR" ]; then  
    echo -e "\033[31m变量DSG_DIR $DSG_DIR 为空,终止操作,按任意键退出...\033[0m"  
    read -n 1  
    exit 1
fi  
  
FILES=(  
    "qgis-mime.dci"
    "qgis-qgs.dci"
    "qgis-qpt.dci" 
)
  
for file in "${FILES[@]}"  
do  
    # 查找目录中的图标文件,并重命名为.bak文件  
    find "$DSG_DIR" -name "$file" -type f -exec mv {} "{}.bak" \;
    find "$DSG_DIR" -name "$file" -type l -exec mv {} "{}.bak" \; 
done 
 
FILES=(  
    "qgis-asc.svg"
    "qgis-ddf.svg"
    "qgis-dem.svg"
    "qgis-dt0.svg"
    "qgis-dxf.svg"
    "qgis-gml.svg"
#    "qgis-img.svg" 
    "qgis-mime.svg"
    "qgis-mldata.svg"
    "qgis-qgs.svg"
    "qgis-qlr.svg"
    "qgis-qml.svg"
    "qgis-qpt.svg"
    "qgis-shp.svg"
    "qgis-sqlite.svg" 
)
  
for file in "${FILES[@]}"  
do  
    # 查找目录中的图标文件,并重命名为.bak文件  
    find "$BLOOM_DIR" -name "$file" -type f -exec mv {} "{}.bak" \;
    find "$BLOOM_DIR" -name "$file" -type l -exec mv {} "{}.bak" \; 
done 

# ++++++++++++++++++禁用Papirus主题默认的qgis文件图标++++++++++++++++++

Papirus_DIR="/usr/share/icons/Papirus"  
  
# 检查$FILE_DIR变量是否为空  
if [ -z "$Papirus_DIR" ]; then  
    echo -e "\033[31m变量FILE_DIR $Papirus_DIR 为空,终止操作,按任意键退出...\033[0m"  
    read -n 1  
    exit 1
fi  
  
FILES=(  
    "qgis-asc.svg"
    "qgis-ddf.svg"
    "qgis-dem.svg"
    "qgis-dt0.svg"
    "qgis-dxf.svg"
    "qgis-gml.svg"
#    "qgis-img.svg" 
    "qgis-mime.svg"
    "qgis-mldata.svg"
    "qgis-qgs.svg"
    "qgis-qlr.svg"
    "qgis-qml.svg"
    "qgis-qpt.svg"
    "qgis-shp.svg"
    "qgis-sqlite.svg" 
)
  
for file in "${FILES[@]}"  
do  
    # 查找目录中的图标文件,并重命名为.bak文件  
    find "$Papirus_DIR" -name "$file" -type f -exec mv {} "{}.bak" \;
    find "$Papirus_DIR" -name "$file" -type l -exec mv {} "{}.bak" \; 
done 

# 设置ACE环境变量的路径
ACE_ENV=/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/ace-env

# 检查$FILE_DIR变量是否为空  
if [ -z "$ACE_ENV" ]; then  
    echo -e "\033[31m变量FILE_DIR $ACE_ENV 为空,终止操作,按任意键退出...\033[0m"  
    read -n 1  
    exit 1
fi  

# 复制QGIS的mime类型文件
sudo cp $ACE_ENV/usr/share/mime/packages/qgis.xml /usr/share/mime/packages/
# 复制QGIS的桌面文件
sudo cp $ACE_ENV/usr/share/applications/org.qgis.qgis.desktop /usr/share/applications
# 更新mime数据库
sudo update-mime-database /usr/share/mime
# 更新桌面数据库
sudo update-desktop-database /usr/share/applications
# 更新图标缓存
sudo update-icon-caches /usr/share/icons/*
echo "QGIS文件关联图标已更新" 
Reply View the author
绍贝格尔
deepin
2024-07-21 18:45
#4

flatpak 版本也不行吗

Reply View the author
神末shenmo
deepin
Spark-App
2024-07-21 18:47
#5
MeGusta

另外,QGIS默认的图标会被系统主题图标覆盖,这是解决方法:

#! /bin/bash

# ==================处理QGIS文件关联及图标问题=============

# ++++++++++++++++++禁用bloom主题默认的qgis文件图标++++++++++++++++++
 
DSG_DIR="/usr/share/dsg/icons/bloom"
BLOOM_DIR="/usr/share/icons/bloom"
  
# 检查$BLOOM_DIR变量是否为空  
if [ -z "$BLOOM_DIR" ]; then  
    echo -e "\033[31m变量BLOOM_DIR $BLOOM_DIR 为空,终止操作,按任意键退出...\033[0m"  
    read -n 1  
    exit 1
fi  

# 检查$DSG_DIR变量是否为空  
if [ -z "$DSG_DIR" ]; then  
    echo -e "\033[31m变量DSG_DIR $DSG_DIR 为空,终止操作,按任意键退出...\033[0m"  
    read -n 1  
    exit 1
fi  
  
FILES=(  
    "qgis-mime.dci"
    "qgis-qgs.dci"
    "qgis-qpt.dci" 
)
  
for file in "${FILES[@]}"  
do  
    # 查找目录中的图标文件,并重命名为.bak文件  
    find "$DSG_DIR" -name "$file" -type f -exec mv {} "{}.bak" \;
    find "$DSG_DIR" -name "$file" -type l -exec mv {} "{}.bak" \; 
done 
 
FILES=(  
    "qgis-asc.svg"
    "qgis-ddf.svg"
    "qgis-dem.svg"
    "qgis-dt0.svg"
    "qgis-dxf.svg"
    "qgis-gml.svg"
#    "qgis-img.svg" 
    "qgis-mime.svg"
    "qgis-mldata.svg"
    "qgis-qgs.svg"
    "qgis-qlr.svg"
    "qgis-qml.svg"
    "qgis-qpt.svg"
    "qgis-shp.svg"
    "qgis-sqlite.svg" 
)
  
for file in "${FILES[@]}"  
do  
    # 查找目录中的图标文件,并重命名为.bak文件  
    find "$BLOOM_DIR" -name "$file" -type f -exec mv {} "{}.bak" \;
    find "$BLOOM_DIR" -name "$file" -type l -exec mv {} "{}.bak" \; 
done 

# ++++++++++++++++++禁用Papirus主题默认的qgis文件图标++++++++++++++++++

Papirus_DIR="/usr/share/icons/Papirus"  
  
# 检查$FILE_DIR变量是否为空  
if [ -z "$Papirus_DIR" ]; then  
    echo -e "\033[31m变量FILE_DIR $Papirus_DIR 为空,终止操作,按任意键退出...\033[0m"  
    read -n 1  
    exit 1
fi  
  
FILES=(  
    "qgis-asc.svg"
    "qgis-ddf.svg"
    "qgis-dem.svg"
    "qgis-dt0.svg"
    "qgis-dxf.svg"
    "qgis-gml.svg"
#    "qgis-img.svg" 
    "qgis-mime.svg"
    "qgis-mldata.svg"
    "qgis-qgs.svg"
    "qgis-qlr.svg"
    "qgis-qml.svg"
    "qgis-qpt.svg"
    "qgis-shp.svg"
    "qgis-sqlite.svg" 
)
  
for file in "${FILES[@]}"  
do  
    # 查找目录中的图标文件,并重命名为.bak文件  
    find "$Papirus_DIR" -name "$file" -type f -exec mv {} "{}.bak" \;
    find "$Papirus_DIR" -name "$file" -type l -exec mv {} "{}.bak" \; 
done 

# 设置ACE环境变量的路径
ACE_ENV=/opt/apps/cn.flamescion.bookworm-compatibility-mode/files/ace-env

# 检查$FILE_DIR变量是否为空  
if [ -z "$ACE_ENV" ]; then  
    echo -e "\033[31m变量FILE_DIR $ACE_ENV 为空,终止操作,按任意键退出...\033[0m"  
    read -n 1  
    exit 1
fi  

# 复制QGIS的mime类型文件
sudo cp $ACE_ENV/usr/share/mime/packages/qgis.xml /usr/share/mime/packages/
# 复制QGIS的桌面文件
sudo cp $ACE_ENV/usr/share/applications/org.qgis.qgis.desktop /usr/share/applications
# 更新mime数据库
sudo update-mime-database /usr/share/mime
# 更新桌面数据库
sudo update-desktop-database /usr/share/applications
# 更新图标缓存
sudo update-icon-caches /usr/share/icons/*
echo "QGIS文件关联图标已更新" 

收藏了

Reply View the author
131******66
deepin
2024-07-22 15:16
#6
MeGusta

即便是UBUNTU环境下,也不是这样安装QGIS的啊...

使用ACE兼容环境安装QGIS:

#! /bin/bash
# ==================安装ACE-Bookworm兼容环境=============

# 检查包是否已安装  
if ! dpkg -l | grep -q "^ii  cn.flamescion.bookworm-compatibility-mode"; then  
    # 如果未安装,则安装  
    echo "ACE-Bookworm兼容环境未安装,开始安装..."  
    sudo apt update
    sudo apt install cn.flamescion.bookworm-compatibility-mode  -y
    echo "ACE-Bookworm兼容环境已安装"  
else  
    echo "ACE-Bookworm兼容环境已安装"  
fi

# ==================安装QGIS-LTR=============

# 使用wget命令下载QGIS的公钥到/etc/apt/keyrings/目录下,如果下载失败,脚本将退出
sudo bookworm-run wget -O /etc/apt/keyrings/qgis-archive-keyring.gpg https://download.qgis.org/downloads/qgis-archive-keyring.gpg || exit 1

# 在/tmp目录下,创建一个名为qgis.sources的文件,包含QGIS的apt源信息
cat << EOF > /tmp/qgis.sources
Types: deb deb-src
URIs: https://qgis.org/debian-ltr
Suites: bookworm
Architectures: amd64
Components: main
Signed-By: /etc/apt/keyrings/qgis-archive-keyring.gpg
EOF

# 将刚才创建的qgis.sources文件复制到/etc/apt/sources.list.d/目录下,复制完毕删除/tmp/qgis.sources
sudo bookworm-run cp /tmp/qgis.sources /etc/apt/sources.list.d/qgis.sources && rm /tmp/qgis.sources

# 更新apt的软件源信息,然后安装qgis、fcitx5(fcitx5解决QGIS中文无法输入的问题)
sudo bookworm-run apt update && sudo bookworm-run apt install -f qgis fcitx5 -y

感谢大佬分享

Reply View the author
pengzhangsheng
deepin
2024-08-30 22:52
#7
MeGusta

即便是UBUNTU环境下,也不是这样安装QGIS的啊...

使用ACE兼容环境安装QGIS:

#! /bin/bash
# ==================安装ACE-Bookworm兼容环境=============

# 检查包是否已安装  
if ! dpkg -l | grep -q "^ii  cn.flamescion.bookworm-compatibility-mode"; then  
    # 如果未安装,则安装  
    echo "ACE-Bookworm兼容环境未安装,开始安装..."  
    sudo apt update
    sudo apt install cn.flamescion.bookworm-compatibility-mode  -y
    echo "ACE-Bookworm兼容环境已安装"  
else  
    echo "ACE-Bookworm兼容环境已安装"  
fi

# ==================安装QGIS-LTR=============

# 使用wget命令下载QGIS的公钥到/etc/apt/keyrings/目录下,如果下载失败,脚本将退出
sudo bookworm-run wget -O /etc/apt/keyrings/qgis-archive-keyring.gpg https://download.qgis.org/downloads/qgis-archive-keyring.gpg || exit 1

# 在/tmp目录下,创建一个名为qgis.sources的文件,包含QGIS的apt源信息
cat << EOF > /tmp/qgis.sources
Types: deb deb-src
URIs: https://qgis.org/debian-ltr
Suites: bookworm
Architectures: amd64
Components: main
Signed-By: /etc/apt/keyrings/qgis-archive-keyring.gpg
EOF

# 将刚才创建的qgis.sources文件复制到/etc/apt/sources.list.d/目录下,复制完毕删除/tmp/qgis.sources
sudo bookworm-run cp /tmp/qgis.sources /etc/apt/sources.list.d/qgis.sources && rm /tmp/qgis.sources

# 更新apt的软件源信息,然后安装qgis、fcitx5(fcitx5解决QGIS中文无法输入的问题)
sudo bookworm-run apt update && sudo bookworm-run apt install -f qgis fcitx5 -y

安装qgis总是会遇到下面的签名问题,各种办法都试过了,还是一样的。

GPG 错误:https://debian.qgis.org/debian-ltr bookworm InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY

有遇到过这个问题吗?

Reply View the author
MeGusta
deepin
2024-08-31 20:01
#8
pengzhangsheng

安装qgis总是会遇到下面的签名问题,各种办法都试过了,还是一样的。

GPG 错误:https://debian.qgis.org/debian-ltr bookworm InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY

有遇到过这个问题吗?

是不是公钥下载失败了? 用下面的命令再试一下。
 
sudo bookworm-run wget -O /etc/apt/keyrings/qgis-archive-keyring.gpg https://download.qgis.org/downloads/qgis-archive-keyring.gpg 
Reply View the author