解決CentOS7 卡在開機介面進不去登入介面

來源:互聯網
上載者:User

解決CentOS7 卡在開機介面進不去登入介面

CentOS7 系統預設的Python版本是2.7.5,在安裝Anaconda Python 2.7.11的時候,不小心把之前的Python刪除了,然後系統案頭進不去了,只能通過遠程登入進系統。最後發現根本原因還是核心版本從3.0更新到3.1導致的。

查看CentOS7版本資訊:
[root@biostacs ~]# lsb_release -aLSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarchDistributor ID: CentOSDescription:    CentOS Linux release 7.1.1503 (Core)Release:        7.1.1503Codename:       Core
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
刪除Anaconda Python

直接刪除 /root/Anaconda2檔案夾

找到CentOS7版本對應的軟體源

http://mirror.centos.org/centos-7/7/os/x86_64/Packages/

刪除環境變數

在 /etc/profile、~/.bashrc裡刪除

重新安裝Python

運行下面命令:

rpm -Uvh --replacepkgs http://mirror.centos.org/centos-7/7/os/x86_64/Packages/python-2.7.5-34.el7.x86_64.rpm
  • 1
  • 1
重新安裝GNOME案頭
yum groupremove "X Window System" "GNOME Desktop Environment" -yyum groupinstall "X Window System" "GNOME Desktop Environment" -y
  • 1
  • 2
  • 1
  • 2
yum update
yum uodate
  • 1
  • 1

等待更新完成


相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.