ubuntu无法进入桌面,安装ubuntu-desktop失败的解决办法

谁说胖子不能爱 提交于 2020-08-18 04:04:25

在执行windows远程连接ubuntu操作(安装 XfceXrdp )后,ubuntu在登录后无法进入桌面。

  • 解决方法如下:

1.Ctrl+Alt+F1(或者F2-F8)进入命令行界面,登录账户

2.卸载Xwindows软件

sudo apt-get autoremove ubuntu-desktop

3.安装所有依赖软件

sudo apt-get update

sudo apt-get install ubuntu-desktop
4.重启 reboot

  • 执行重装ubuntu-desktop前,可优先卸载引起该问题的软件
  • 执行sudo apt install ubuntu-desktop时报错
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ubuntu-desktop : Depends: nautilus but it is not going to be installed
                  Recommends: libreoffice-calc but it is not going to be installed
                  Recommends: libreoffice-gnome but it is not going to be installed
                  Recommends: libreoffice-impress but it is not going to be installed
                  Recommends: libreoffice-math but it is not going to be installed
                  Recommends: libreoffice-ogltrans but it is not going to be installed
                  Recommends: libreoffice-writer but it is not going to be installed
                  Recommends: nautilus-share but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

解决方法1:

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ bionic main universe multiverse restricted"
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ bionic-updates main universe multiverse restricted"
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ bionic-security main universe multiverse restricted"
sudo apt-get upgrade
sudo apt-get install ubuntu-desktop

解决方法2:

  • First run sudo apt install -f
  • First run sudo apt --fix-broken install
  • Run sudo apt install --reinstall ubuntu-desktop
  • Run sudo dpkg --configure -a && sudo apt autoremove -y && sudo apt autoclean && sudo apt remove && sudo apt clean && sudo apt update && sudo apt install -f && sudo apt full-upgrade -y

----------------------------------------------------------------

最终问题未解决,重装系统

期待更好的解决办法

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!