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

软件源讨论区
回复
duyanning
帖子: 82
注册时间: 2007-06-23 17:27
系统: Linux Mint 13
送出感谢: 1 次
接收感谢: 0

在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
论坛版主
帖子: 3013
注册时间: 2008-09-18 13:11
送出感谢: 1 次
接收感谢: 495 次

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
送出感谢: 1 次
接收感谢: 0

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

#3

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

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

回到 “新立得和软件源”