问题描述:
- 出现driver loading,在输入用户名密码后,在tty1界面无法通过ctrl+alt+f2进入图形界面。可能和之前删除ubuntu下自带python包,用autoremove后发生故障
- 进入命令行界面后ping www.baidu.com 显示的是temporary faliure in name resolution,ping 8.8.8.8发现能ping通但是丢包。可能是网关问题
首先是安装图形桌面发现安装失败
sudo apt-get update
显示some index files failed to download "Error in Ubuntu apt-get update",可能是库有问题,换库ubuntu 执行apt-get update报错Failed to fetch_error: failed to solve: process "/bin/sh -c apt-ge-CSDN博客
vi /etc/apt/sources.list
将库换为
换源之后
sudo apt-get clean
sudo apt-get update
Err http://security.ubuntu.com precise-security InRelease
Err http://security.ubuntu.com precise-security Release.gpg
Temporary failure resolving 'security.ubuntu.com'
Err http://cn.archive.ubuntu.com precise InRelease
Err http://cn.archive.ubuntu.com precise-updates InRelease
Err http://cn.archive.ubuntu.com precise-backports InRelease
Err http://cn.archive.ubuntu.com precise Release.gpg
Temporary failure resolving 'cn.archive.ubuntu.com'
Err http://cn.archive.ubuntu.com precise-updates Release.gpg
Temporary failure resolving 'cn.archive.ubuntu.com'
Err http://cn.archive.ubuntu.com precise-backports Release.gpg
Temporary failure resolving 'cn.archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/precise/InRelease
W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/precise-updates/InRelease
W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/precise-backports/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/InRelease
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/Release.gpg Temporary failure resolving 'security.ubuntu.com'
W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg Temporary failure resolving 'cn.archive.ubuntu.com'
W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/precise-updates/Release.gpg Temporary failure resolving 'cn.archive.ubuntu.com'
W: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/precise-backports/Release.gpg Temporary failure resolving 'cn.archive.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
可知不是源的问题
ifconfig发现没有联网,重新联网ubuntu误删图形界面一直进tty_ubuntu不小心卸载了桌面-CSDN博客
sudo dhclient exxx0
这里选择的exxx0,是带有ip地址的网关,这里选的是eno3
这时就可以ping通百度了,再进行安装图形界面
sudo apt-get install xorg
sudo apt-get install ubuntu-desktop
但ping通之后发现,samba文件共享服务无法启用,显示无法检索到服务器ip地址,可能是网关配置问题,ifconifg显示enoX以及enoX avahi,Delete eth0 avahi from the ifconfig list_eth0:avahi-CSDN博客发现avahi是在DHCP发生故障时分配ip地址。
解决方法
-
reboot # 只启动eno3 sudo dhclient eno3 # 开启网络服务 sudo /etc/init.d/network-manager restart
- Delete eth0 avahi from the ifconfig list_eth0:avahi-CSDN博客