之前装好的CentOS7虚拟机是可以运行的,今天用Xshell突然就连不上去,经检查发现网卡启动不了。百度下发现贴吧上的答案真的太水了,一堆复制粘贴不负责任的。顺便记录下自己的解决方法,以便日后忘记。

        

具体报错如下:

 

Restarting network (via systemctl):  Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.

[失败]

        

使用命令 systemctl status network 查看报错:Failed to start LSB: Bring up/down networking.

 

解决方法:系统自带的NetworkManager这个管理套件影响到网卡的启动,关掉就可以解决

 

systemctl stop NetworkManager		//停止NetworkManager
systemctl disable NetworkManager	//并使其失效,开机不启动
systemctl start network			//启动网络后就OK了

 

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐