Ubuntu14.04升级16.04无法进入桌面的解决办法

(注意:升级过程中,配置文件均选择“替换(replace)”)

解决步骤:

进入命令行界面

1.获取libstdc++安装包  (安装包网址http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/)

     wget http://security.ubuntu.com/ubuntu/pool/main/g/gcc-5/libstdc++6_5.4.0-6ubuntu1~16.04.10_amd64.deb  (选择需要的包

2.安装

     sudo dpkg -i libstdc++6_5.4.0-6ubuntu1~16.04.10_amd64.deb

# I also found this helpful

     sudo apt-get -f install

3.重启

      reboot

虽然成功进入了桌面,但在使用过程中我仍然遇到了一个问题:

root@ubuntu:~# apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libstdc++-5-dev : Depends: libstdc++6 (>= 5.4.1-2ubuntu1~12.04) but 5.4.0-6ubuntu1~16.04.10 is installed
 libstdc++6 : Depends: gcc-5-base (= 5.4.0-6ubuntu1~16.04.10) but 5.4.1-2ubuntu1~12.04 is installed

E: Unmet dependencies. Try using -f.】
这是libstdc++依赖的gcc-5-base版本不匹配所导致,解决办法如下:

1.下载并安装正确的依赖版本: gcc-5-base_5.4.0-6ubuntu1_16.04.11_amd64.deb

2.执行

   apt-get -f install

进行修复。 

你可能感兴趣的:(嵌入式)