apt update 走第三方源报 Could not connect to,原因竟是 apt 不继承终端里的代理环境变量。解法是 sudo visudo 添加 Defaults env_keep,把 http_proxy 等变量保留给 apt。