下述这些遇到的问题建议配合这个指导搭建ndnSIM教程(指路)来看,是在按教程走时自己遇到的一些问题,主要作用是自己记录下,如果其他人能通过这个少走一些弯路的话也挺好的:
文章目录
- 1.在使用pip install pygccxml语句安装pygccxml模块时出现"IOError:[Errno 2] No such file or directory :'/tmp/pip-build……""Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build"
- 2.拉取github报错 gnutls_handshake() failed: The TLS connection was non-properly terminated.
- 3.git submodule update --init报错Failed to connect to github.com port 443: Connection refused
- 4.执行sudo python setup.py install报错Couldn't find a setup script in /tmp/easy_install-cFTqKy/setuptools-scm-8.0.4.tar.gz
1.在使用pip install pygccxml语句安装pygccxml模块时出现"IOError:[Errno 2] No such file or directory :'/tmp/pip-build……"“Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build”
开始先声明下,我的python版本是2.7。查了很多针对这个问题的解决方案,但是都没有得到解决。最终在一个知乎中找到了解决方案:卸载pip,重装升级后的pip
首先,卸载pip
sudo apt-get remove python-pip
卸载后,我们前往官网下载我们需要的版本,在这里推荐 20.3.3(pip21版本不再支持python2)
在下载后文件的目录解压,输入:
sudo tar -zxvf pip-20.3.3.tar.gz
解压后进入解压生成的文件夹,输入:
sudo python setup.py install
一般可成功安装pip,安好后重新执行pip安装:
pip install pygccxml
安装成功!
2.拉取github报错 gnutls_handshake() failed: The TLS connection was non-properly terminated.
查询原因:代理设置出错
显示根据网上重置代理
git config --global --unset https.https://github.com.proxy
git config --global --unset http.https://github.com.proxy
还是拉取不成功
又尝试添加了代理:
git config --global http.proxy http://127.0.0.1:1080
git config --global https.proxy http://127.0.0.1:1080
报错connection refused,还是不行
最终又执行了取消代理:
git config --global --unset https.https://github.com.proxy
git config --global --unset http.https://github.com.proxy
3.git submodule update --init报错Failed to connect to github.com port 443: Connection refused
这个语句的作用是clone带有submodule的git库
可能受网络影响一次拉不成功,多执行这个语句几次,就可以了。
4.执行sudo python setup.py install报错Couldn’t find a setup script in /tmp/easy_install-cFTqKy/setuptools-scm-8.0.4.tar.gz
我又重复执行了两次,报错原因更改为"distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse(‘setuptools_scm’)
"
我执行了:
pip install setuptools_scm
一次下不成功可以多下几次
后续在编译中遇到的问题,在开头我提到的教程中都有指导该如何去调,也是非常感谢原作者!
那就先到这里啦!
主要参考文章
1.https://zhuanlan.zhihu.com/p/551563780
2.https://cloud.tencent.com/developer/article/2136829