如何安装g++?
Tofloor
poster avatar
moriwuhen
deepin
2017-09-23 18:09
Author
本帖最后由 moriwuhen 于 2017-9-23 10:10 编辑

系统好像只有gcc:
gcc --version
gcc (Debian 6.3.0-11) 6.3.0 20170321


安装论坛https://bbs.deepin.org/post/145313需要cmake——然后安装cmake需要g++——然而安装g++各种搜索都搞不定。
希望可以帮忙。谢谢~


Reply Favorite View the author
All Replies
avatar
comzhong
deepin
2017-09-23 18:26
#1
本帖最后由 comzhong 于 2017-9-23 13:59 编辑

#安装:gcc g++ gdb cmake git
sudo apt-get update
sudo apt-get install build-essential gcc g++ gdb cmake git
sudo ln -s /usr/lib/i386-linux-gnu/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
sudo ln -s /usr/lib/x86_64-linux-gnu/libGL.so.1 /usr/lib/x86_64-linux-gnu/libGL.so
Reply View the author
avatar
moriwuhen
deepin
2017-09-23 18:31
#2
本帖最后由 moriwuhen 于 2017-9-23 10:35 编辑
https://bbs.deepin.org/post/145911
#安装:gcc g++ gdb cmake git
sudo apt-get install gcc g++ gdb cmake git
sudo ln -s /usr/lib/i386-lin ...

sudo apt-get install gcc g++ gdb cmake git
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
注意,根据正则表达式 'g+' 选中了 'xorg-driver-input'
注意,根据正则表达式 'g+' 选中了 'xorg-video-abi-8'
注意,根据正则表达式 'g+' 选中了 'libpam0g'
注意,根据正则表达式 'g+' 选中了 'kde-config-fcitx'
注意,根据正则表达式 'g+' 选中了 'qt4-qtconfig'
注意,根据正则表达式 'g+' 选中了 'xserver-xorg-input-all'
注意,根据正则表达式 'g+' 选中了 'myspell-el-gr'
注意,根据正则表达式 'g+' 选中了 'libjson-glib-1.0-0'
注意,根据正则表达式 'g+' 选中了 'postgresql-common'
注意,根据正则表达式 'g+' 选中了 'librsvg2-bin'
注意,根据正则表达式 'g+' 选中了 'network-manager-l2tp-gnome'
注意,根据正则表达式 'g+' 选中了 'gnome-themes-extras'
注意,根据正则表达式 'g+' 选中了 'libkf5kiowidgets5'
...(删去很多类似上面的语句)
注意,根据正则表达式 'g+' 选中了 'germinate'
注意,根据正则表达式 'g+' 选中了 'libpng16-16'
注意,选中 'iputils-ping' 而非 'ping'
注意,选中 'libgmp-dev' 而非 'libgmp10-dev'
注意,选中 'libpaper1' 而非 'libpaperg'
注意,选中 'libgl1-mesa-glx' 而非 'libgl1'
注意,选中 'dde-session-ui' 而非 'lightdm-greeter'
注意,选中 'libapt-pkg5.0' 而非 'libapt-pkg'
注意,选中 'perl-modules-5.24' 而非 'libdigest-perl'
注意,选中 'perl-modules-5.24' 而非 'libi18n-langtags-perl'
注意,选中 'perl-modules-5.24' 而非 'libmath-bigint-perl'
注意,选中 'perl-modules-5.24' 而非 'libnet-ping-perl'
注意,选中 'libfontconfig1' 而非 'libfontconfig'
注意,选中 'xserver-xorg-core' 而非 'xorg-video-abi-23'
..(删去很多类似上面的语句)
...
注意,选中 'libqt5xdgiconloader2' 而非 'libqt5xdgiconloader'
注意,选中 'python' 而非 'python-wsgiref'
没有可用的软件包 git,但是它被其它的软件包引用了。
这可能意味着这个缺失的软件包可能已被废弃,
或者只能在其他发布源中找到

没有可用的软件包 cmake,但是它被其它的软件包引用了。
这可能意味着这个缺失的软件包可能已被废弃,
或者只能在其他发布源中找到

E: 软件包 cmake 没有可安装候选
E: 软件包 git 没有可安装候选







Reply View the author
avatar
loufand
deepin
2017-09-23 18:38
#3
#先更新一下
sudo apt-get update

sudo apt-get install build-essential
Reply View the author
avatar
aurthur
deepin
2017-09-23 19:04
#4
是在逗我吗?
Reply View the author
avatar
duanyao
deepin
2017-09-23 22:45
#5
看起来“+”对 apt 有特殊含义。我试了一下,带上引号,sudo apt install "g++" 就可以了,而 apt search 还要带上反斜杠才行:apt search "g\+\+" 。
没找到相关的文档,有没有专家解释一下?
Reply View the author
avatar
cy844757727
deepin
2017-09-24 00:29
#6
https://bbs.deepin.org/post/145911
看起来“+”对 apt 有特殊含义。我试了一下,带上引号,sudo apt install "g++" 就可以了,而 apt search  ...

我的就没加引号,search也没加反斜杠,apt正常。是不是我两的shell环境不一样(系统默认的bash)
Reply View the author
avatar
zouqilin
deepin
2017-09-24 00:42
#7
可以尝试clang(++)
Reply View the author
avatar
jiangzm
deepin
2017-09-24 01:05
#8
sudo apt-get install g++
Reading package lists... Done
Building dependency tree      
Reading state information... Done
g++ is already the newest version (4:6.3.0-2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
好像没问题啊。。
Reply View the author
avatar
moriwuhen
deepin
2017-09-24 02:18
#9
https://bbs.deepin.org/post/145911
#先更新一下
sudo apt-get update

谢谢。sudo apt-get install build-essential后问题解决了。
Reply View the author
avatar
duanyao
deepin
2017-09-24 02:49
#10
https://bbs.deepin.org/post/145911
我的就没加引号,search也没加反斜杠,apt正常。是不是我两的shell环境不一样(系统默认的bash) ...

不清楚怎么回事,我的也是 bash,在系统监视器里确认了。版本:
$ bash --version
GNU bash,版本 4.4.11(1)-release (x86_64-pc-linux-gnu)
Reply View the author