擅长:python、mysql、java
<p>我在塞拉遇到了这个错误。感谢seeliuh在这个<a href="https://github.com/binux/pyspider/issues/472" rel="nofollow noreferrer">issue</a>中的帖子,我在完成以下操作后修复了它:</p>
<p>1.卸载pycurl。在</p>
<pre><code>pip uninstall pycurl
</code></pre>
<p>2.导出LD_LIBRARY_PATH=<code><<your homebrew's libcurl path>></code></p>
^{pr2}$
<p>3.重新安装pycurl</p>
<pre><code>easy_install pycurl # you also can try to use pip though using it here probably would cause some problems
</code></pre>
<p><strong>注意:</strong></p>
<p><a href="http://pycurl.io/docs/latest/install.html" rel="nofollow noreferrer">PycURL documentation</a>指出:</p>
<blockquote>
<p>If libcurl is linked dynamically with pycurl, you may have to alter the LD_LIBRARY_PATH environment variable accordingly. This normally applies only if there is more than one version of libcurl installed, e.g. one in /usr/lib and one in /usr/local/lib.</p>
</blockquote>
<p>因此,您应该将<code>LD_LIBRARY_PATH</code>更改为自制的libcurl路径。(自制程序的libcurl版本应该大于编译时版本。请检查一下。)</p>