持久决心 2016-11-30 03:26 采纳率: 50%
浏览 3754

Ubuntu14.04升级gcc版本到5出错

我主要按照博客Ubuntu 14.04 LTS 下升级 gcc 到 gcc-4.9、gcc-5 版本的步骤升级gcc。

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install software-properties-common
sudo apt-get upgrade
sudo apt-get install gcc-5 g++-5

之后出现问题:

 gph@gph-pc:~$ sudo apt-get install gcc-5
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:
 gcc-5:i386 : Depends: cpp-5:i386 (= 5.4.1-2ubuntu1~14.04) but it is not going to be installed
              Depends: libcc1-0:i386 (>= 5.4.1-2ubuntu1~14.04) but it is not going to be installed
              Depends: binutils:i386 (>= 2.24) but it is not going to be installed
              Depends: libgcc-5-dev:i386 (= 5.4.1-2ubuntu1~14.04) but it is not going to be installed
              Depends: libc6:i386 (>= 2.15) but it is not going to be installed
              Depends: libgcc1:i386 (>= 1:3.0) but it is not going to be installed
              Depends: libgmp10:i386 but it is not going to be installed
              Depends: libisl15:i386 (>= 0.15) but it is not going to be installed
              Depends: libmpc3:i386 but it is not going to be installed
              Depends: libmpfr4:i386 (>= 3.1.3) but it is not going to be installed
              Depends: libstdc++6:i386 (>= 4.1.1) but it is not going to be installed
              Depends: zlib1g:i386 (>= 1:1.1.4) but it is not going to be installed
              Recommends: libc6-dev:i386 (>= 2.13-0ubuntu6) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

请问有人知道如何解决吗?
已经百度和Google过相关的问题了,还是没有解决,请各位提供帮助,谢谢!

最后通过本地编译安装的方式安装了gcc5.3.0,但是在编译一个代码的时候出现如下错误:

 .build_release/lib/libcaffe.so: undefined reference to `boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char.build_release/lib, std/libcaffe.so: undefined reference to `boost::match_results<__gnu_cxx::__normal_iterator<char const*, std:::__cxx11:::basic_string<charchar_traits, std<::char_traits<charchar>, std::allocator<char> > >, std::allocator<boost::sub_match<>__gnu_cxx::__normal_iterator<, .build_release/tools/get_image_size.o: In function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >* google::MakeCheckOpString<unsigned long, unsigned long>(unsigned long const&, unsigned long const&, char const*)':
get_image_size.cpp:(.text._ZN6google17MakeCheckOpStringImmEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc[_ZN6google17MakeCheckOpStringImmEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_RKT0_PKc]+0x41): undefined reference to `google::base::CheckOpMessageBuilder::NewString[abi:cxx11]()'
.build_release/tools/get_image_size.o: In function `main':
get_image_size.cpp:(.text.startup+0x66): undefined reference to `google::SetUsageMessage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
get_image_size.cpp:(.text.startup+0x722): undefined reference to `caffe::GetImageSize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int*, int*)'

。 。 。 。 。 。

.build_release/lib/libcaffe.so: undefined reference to `google::base::CheckOpMessageBuilder::NewString[abi:cxx11]()'
collect2: error: ld returned 1 exit status
make: *** [.build_release/tools/device_query.bin] Error 1

这又是什么问题。。。?

  • 写回答

3条回答 默认 最新

  • 鱼弦 全栈领域优质创作者 2016-11-30 03:34
    关注

    编译器安装包有问题吧

    评论

报告相同问题?

悬赏问题

  • ¥15 shape_predictor_68_face_landmarks.dat
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制