在win10的wsl下安装g++时遇到问题

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
duyanning
帖子: 82
注册时间: 2007-06-23 17:27
系统: Linux Mint 13

在win10的wsl下安装g++时遇到问题

#1

帖子 duyanning » 2016-08-03 15:23

我先装了gcc,然后嫌自带的源太慢,就改用了163的源,结果安装g++时遇到问题了,如下:

dyn@DELL:/etc/apt$ sudo apt-get install g++
sudo: unable to resolve host DELL
Reading package lists... Done
Building dependency tree
Reading state information... Done
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:
g++ : Depends: g++-4.8 (>= 4.8.2-5~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


dyn@DELL:/etc/apt$ sudo apt-get install g++-4.8
sudo: unable to resolve host DELL
Reading package lists... Done
Building dependency tree
Reading state information... Done
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:
g++-4.8 : Depends: gcc-4.8-base (= 4.8.4-2ubuntu1~14.04) but 4.8.4-2ubuntu1~14.04.3 is to be installed
Depends: gcc-4.8 (= 4.8.4-2ubuntu1~14.04) but 4.8.4-2ubuntu1~14.04.3 is to be installed
Depends: libstdc++-4.8-dev (= 4.8.4-2ubuntu1~14.04) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
头像
astolia
论坛版主
帖子: 6396
注册时间: 2008-09-18 13:11

Re: 在win10的wsl下安装g++时遇到问题

#2

帖子 astolia » 2016-08-05 23:50

163的源现在已经废了,大半年都没跟官方同步过了。建议用阿里云的 http://mirrors.aliyun.com/ubuntu/
duyanning
帖子: 82
注册时间: 2007-06-23 17:27
系统: Linux Mint 13

Re: 在win10的wsl下安装g++时遇到问题

#3

帖子 duyanning » 2016-08-08 8:33

astolia 写了:163的源现在已经废了,大半年都没跟官方同步过了。建议用阿里云的 http://mirrors.aliyun.com/ubuntu/
多谢!
后来证实确实是163源的问题,改用ubuntu中国官方源就好了。
回复