Ubuntu20.04突然在tty1界面加载,无法进入图形界面

问题描述:

  1. 出现driver loading,在输入用户名密码后,在tty1界面无法通过ctrl+alt+f2进入图形界面。可能和之前删除ubuntu下自带python包,用autoremove后发生故障
  2. 进入命令行界面后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地址。

解决方法

  1. reboot
    # 只启动eno3
    sudo dhclient eno3
    # 开启网络服务
    sudo /etc/init.d/network-manager restart
  2. Delete eth0 avahi from the ifconfig list_eth0:avahi-CSDN博客
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值