Raspberry Pi 在 Ubuntu 13.10“libstdc++.so.6"上交叉编译;未找到 [英] Raspberry Pi crosscompile on Ubuntu 13.10 "libstdc++.so.6" not found

查看:22
本文介绍了Raspberry Pi 在 Ubuntu 13.10“libstdc++.so.6"上交叉编译;未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经按照 SE 教程 并尝试了额外的步骤来自 Hertavillebootc 但我仍然收到提示原始 SE 问题的错误.我被难住了.

I've followed the tutorial on SE as well as trying the extra steps from Hertaville and bootc but I still get the error that prompted the original SE question. I'm stumped.

在出现错误之前,我已经完成了五个步骤:

I get five steps into the process before I get the error:

sudo apt-get install git rsync cmake lib32z1 lib32ncurses5 lib32bz2-1.0
git clone git://github.com/raspberrypi/tools.git
export PATH=$PATH:$HOME/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
. ~/.bashrc
arm-linux-gnueabihf-gcc -v

错误:

arm-linux-gnueabihf-gcc: error while loading shared libraries: 
     libstdc++.so.6: cannot open shared object file: No such file or directory

libstdc++.so.6 出现在教程中提到的所有三个目录树以及 ./lib/x86_64-linux-gnu/libstdc++.so.6 中>,但将相关的添加到路径没有帮助(见下文).我怀疑没有设置库路径,但我不知道那是什么.

libstdc++.so.6 is present in all three directory trees mentioned in the tutorials as well as ./lib/x86_64-linux-gnu/libstdc++.so.6, but adding the relevant one to the path doesn't help (see below). I suspect there's a library path not being set, but I have no idea what that is.

我在运行 Ubuntu 13.10 的虚拟机中使用 netbeans 和其他工具执行此操作,并安装了 LAMP 堆栈.netbeans 可以很好地构建和运行 C/C++ 可执行文件(显然 IO 可以从命令行执行相同的操作).

I'm doing this in a virtual machine running Ubuntu 13.10 with netbeans and other tools, plus a LAMP stack installed. netbeans will build and run C/C++ executables just fine (and obviously IO can do the same from the command line).

我尝试过但没有成功的其他事情

Other things I've tried without success

export PATH=$PATH:$HOME/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/lib

Hertaville 建议添加 32 位架构:

Hertaville suggest adding 32 bit architecture:

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6-i386 lib32stdc++6 zlib1g:i386

还有build-essential"包:

And the "build-essential" package:

sudo apt-get install build-essential git

这也没有帮助.我也重启了以防万一.

Which also didn't help. I've also rebooted just in case.

推荐答案

正如所料,答案很简单 - 安装 lib32stdc++6

As expected the answer is trivial - install lib32stdc++6

上面的第一行应该是:

sudo apt-get install libc6-i386 lib32z1 lib32stdc++6

这篇关于Raspberry Pi 在 Ubuntu 13.10“libstdc++.so.6"上交叉编译;未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆