OPENSSL=`pwd`/openssl
LIBSSH=`pwd`/libssh2
#wget -O curl-7.32.0.tar.gz http://curl.haxx.se/download/curl-7.32.0.tar.gz
tar zxf curl-7.32.0.tar.gz
cd curl-7.32.0/
./configure --host=arm-linux-gnueabi --disable-shared --disable-debug --disable-curldebug CFLAGS="-I$PWD/../openssl/include" LDFLAGS="-L$PWD/../openssl/usr/lib"
make clean &&make
sed -i -e "s|\${exec_prefix}/lib/libcurl.a||g" curl-config
chmod a+x curl-config
LIBCURL=`pwd`
cd ..
#wget -O setuptools-1.1.tar.gz https://pypi.python.org/packages/source/s/setuptools/setuptools-1.1.tar.gz
tar zxf setuptools-1.1.tar.gz
#wget -O pycurl-7.19.0.tar.gz http://pycurl.sourceforge.net/download/pycurl-7.19.0.tar.gz
tar zxf pycurl-7.19.0.tar.gz
cd pycurl-7.19.0/
sed -i -e "s|from distutils.core import setup|from setuptools import setup|g" setup.py
CC=arm-linux-gnueabi-gcc LDSHARED="arm-linux-gnueabi-gcc -pthread -shared " PYTHONPATH=../setuptools-1.1 /usr/bin/python setup.py build_ext --openssl-dir=$OPENSSL --curl-config=$LIBCURL/curl-config -I$LIBCURL/include -L$LIBCURL/lib/.libs
#CC=arm-linux-gnueabi-gcc LDSHARED='arm-linux-gnueabi-gcc -shared ' PYTHONPATH=../setuptools-1.1 /usr/bin/python setup.py build_ext --openssl-dir=$OPENSSL --curl-config=$LIBCURL/curl-config -I$LIBCURL/include -L$LIBCURL/lib/.libs
arm-linux-gnueabi-strip build/lib.linux-i686-2.7/pycurl.so
cd ..
1.在安装pip前,请确认win系统中已经安装好了python,和easy_install工具,如果系统安装成功,easy_install在目录C:\Python27\Scripts2.进入命令行,然后把目录切换到python的安装目录下的Script文件夹下,运行 easy_inatall pip。
3.pip安装成功后,在cmd下执行pip!
Question:
持续更新......
(11)重启网络:sudo /etc/init.d/networking restart
·
(10) Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/pycurl.so' Consider using the --user option or check the permissions.
给它sudo 权限就可以了,酱紫:
(9) Failed building wheel for pycurl
(9)make install 时候,酱紫:
很简单,给它root 权限就OK
酱紫: sudo make install
(8)安装Python 2.7的时候报错:
configure: error: no acceptable C compiler found in $PATH See "config.log" for more details
错误:
解决办法:安装基础包
此时 再输入 ./configure 即酱紫: ./configure --prefix=/usr/local/python2 就不会报错了
(7) E: Unable to locate package build-essential
究其原因,应该是刚安装,软件源还来不及更新,所以才会无法找到包。我猜测在更换软件源之后,也很可能会出现这个问题。
输入即可
(6) wget: unable to resolve host address
修改conf 文件: sudo vim /etc/resolv.conf
后面加上:
(5)SSH Xshell 连接不上Linux ubuntu(Ubuntu已安装了ssh)
这个原因是由于自身是server,然后又给它装了一个桌面,所以之后,一直都起不来,最后的解决方法是 卸载桌面,清掉相关的信息,就是酱紫:
(4)apt-get update 报错:
E: Failed to fetch cdrom://Ubuntu-Server 16.04.3 LTS _Xenial Xerus_ - Release amd64 (20170801)/dists/xenial/main/binary-amd64/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs E: Some index files failed to download. They have been ignored, or old ones used instead.
执行 : sudo nano /etc/apt/sources.list or sudo vim /etc/apt/sources.list ,
在顶部附近,注释掉看起来像这样的行:
deb cdrom:[Ubuntu-Server 16.04.3 LTS _Xenial Xerus_ - Release amd64 (20170801)]/ xenial main restricted
再运行 sudo apt-get update :
如果还是觉得没用,试试
(3)第一次ssh上传文件报错:server responded”algorithm negotiation failed”
解决方法:
修改ssh的配置文件 /etc/ssh/sshd_config
cd /etc/ssh
vi /etc/ssh/sshd_config
在配置文件中添加:
重启sshd服务后(sudo service ssh restart),即可正常连接:
sudo service ssh restart 或者 sudo reboot
(2)解决 swap file “*.swp”already exists!问题
方法:
使用vim编辑文件实际是先 copy 一份临时文件并映射到内存给你编辑, 编辑的是临时文件, 当执行:w 后才保存临时文件到原文件,执行:q 后才删除临时文件。
*****将隐藏的 *.swp 文件删除即可,原先的文件便可再次编辑*****
ls -a
rm -r .swp文件eg:rm -r .test.py.swp
vi 文件
(1)虚拟机不能上网:
ifconfig 网卡有没有
VMware 两个网卡
VMware 编辑 恢复初始化
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)