擅长:python、mysql、java
<p>也许用<code>sudo -E</code>试试:</p>
<pre class="lang-none prettyprint-override"><code> -E The -E (preserve environment) option indicates to the secu‐
rity policy that the user wishes to preserve their existing
environment variables. The security policy may return an
error if the -E option is specified and the user does not
have permission to preserve the environment.
</code></pre>
<p>假设您的代理设置是在正常的用户环境中设置的,而不是在运行<code>sudo</code>时设置的。</p>