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
--useroption or check the permissions.
给它sudo 权限就可以了,酱紫:
sudo pip install jieba
(9)Failed building wheel for pycurl
sudo apt-get install build-essential libssl-dev libffi-dev python-dev
(9)make install 时候,酱紫:
/bin/install: cannot create regular file ‘/usr/local/bin/python3.6m’: Permission denied
make: *** [altbininstall] Error 1
很简单,给它root 权限就OK
酱紫:sudo make install
(8)安装Python 2.7的时候报错:
configure: error: no acceptable C compiler found in $PATH See "config.log" for more details
错误:
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for --enable-universalsdk... no
checking for --with-universal-archs... 32-bit
checking MACHDEP... linux2
checking EXTRAPLATDIR...
checking for --without-gcc... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home/pc7574/Python-2.7.10':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
解决办法:安装基础包
sudo apt-get install build-essential
此时 再输入./configure
即酱紫: ./configure --prefix=/usr/local/python2
就不会报错了
(7)E: Unable to locate package build-essential
究其原因,应该是刚安装,软件源还来不及更新,所以才会无法找到包。我猜测在更换软件源之后,也很可能会出现这个问题。
sudo apt-get update
输入即可
(6)wget: unable to resolve host address
修改conf 文件:sudo vim /etc/resolv.conf
后面加上:
nameserver 8.8.8.8 #google域名服务器
nameserver 8.8.4.4 #google域名服务器
(5)SSH Xshell 连接不上Linux ubuntu(Ubuntu已安装了ssh)
这个原因是由于自身是server,然后又给它装了一个桌面,所以之后,一直都起不来,最后的解决方法是 卸载桌面,清掉相关的信息,就是酱紫:
apt-get remove gnome-shell
apt-get remove gnome
apt-get autoremove
apt-get purge gnome
apt-get autoclean
apt-get clean
reboot
(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
:
如果还是觉得没用,试试
sudo apt-get clean
sudo apt-get update
(3)第一次ssh上传文件报错:server responded”algorithm negotiation failed”
解决方法:
修改ssh的配置文件 /etc/ssh/sshd_config
cd /etc/ssh
vi /etc/ssh/sshd_config
在配置文件中添加:
Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256,arcfour,blowfish-cbc,cast128-cbc
MACs hmac-md5,hmac-sha1,[email protected],hmac-ripemd160,hmac-sha1-96,hmac-md5-96
KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1,[email protected]
重启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 编辑 恢复初始化
- 仅学习记录