You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu18.04安装QGIS3.4执行sudo apt-get update遇TLS握手错误求助

Troubleshooting TLS Handshake Error During QGIS 3.4 Installation on Ubuntu 18.04

Hey there, let's break down the issue you're facing. From what you've shared, you followed the official QGIS install steps but hit a TLS handshake error when running sudo apt-get update. Let's start with the details you provided, then walk through possible causes and fixes.

Your Setup & Error Details

You updated /etc/apt/sources.list with the QGIS LTR sources:

deb https://qgis.org/ubuntu-ltr bionic main
deb-src https://qgis.org/ubuntu-ltr bionic main

When running sudo apt-get update, you got this error:

ashj@ashj:~/Downloads/LAStools$ sudo apt-get update
[sudo] password for ashj:
Ign:1 https://qgis.org/ubuntu-ltr bionic InRelease
Err:2 https://qgis.org/ubuntu-ltr bionic Release
Could not handshake: An unexpected TLS packet was received. [IP: 10.4.21.120 8080]

Likely Causes & Fixes

1. Proxy Server Misconfiguration

First, the IP 10.4.21.120:8080 looks like an internal network proxy. Most often, this error happens when the proxy isn't handling HTTPS traffic correctly.

  • Check current proxy settings: Run these commands to see if system-level proxies are set:
    echo $http_proxy $https_proxy
    ls /etc/apt/apt.conf.d/ | grep proxy
    
  • Temporarily bypass proxy: If your network allows direct access, try running update without proxy:
    sudo http_proxy= https_proxy= apt-get update
    
  • Fix proxy HTTPS support: If you need to use the proxy, configure APT to use it properly. Create/edit /etc/apt/apt.conf.d/99proxy with:
    Acquire::http::Proxy "http://10.4.21.120:8080/";
    Acquire::https::Proxy "http://10.4.21.120:8080/";
    
    Note that we use http:// for the HTTPS proxy—this is intentional, as the proxy itself uses HTTP to forward encrypted HTTPS traffic.

2. TLS Version Incompatibility

Ubuntu 18.04's APT might be using a TLS version that the QGIS server or your proxy doesn't support.

  • Force compatible TLS versions: Edit /etc/apt/apt.conf and add these lines:
    Acquire::https::TLSv1.2 "true";
    Acquire::https::TLSv1.3 "false";
    
    Then re-run sudo apt-get update.

3. Network/Firewall Interference

Your internal firewall might be intercepting HTTPS traffic (e.g., with a man-in-the-middle certificate) or blocking the QGIS server entirely.

  • Test the connection directly: Use curl to diagnose the issue:
    curl -v https://qgis.org/ubuntu-ltr/dists/bionic/Release
    
    If you see certificate errors, you'll need to install your network's root CA certificate:
    sudo cp /path/to/your-ca-cert.pem /usr/local/share/ca-certificates/
    sudo update-ca-certificates
    

4. Try a Different QGIS Source

Occasionally, the LTR source might have regional accessibility issues. Switch to the standard QGIS repo by updating /etc/apt/sources.list:

deb https://qgis.org/ubuntu bionic main
deb-src https://qgis.org/ubuntu bionic main

Then run sudo apt-get update again.


内容的提问来源于stack exchange,提问作者Ashj

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.13 07:41:07