分页: 1 / 1

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

发表于 : 2016-08-03 15:23
duyanning
我先装了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.

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

发表于 : 2016-08-05 23:50
astolia
163的源现在已经废了,大半年都没跟官方同步过了。建议用阿里云的 http://mirrors.aliyun.com/ubuntu/

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

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