如何在 RHEL 5 上获取 gcc-3.2.2?
我们刚刚让我们的托管提供商构建了一个新的 RHEL 5 盒子,供我们测试一些遗留的东西:
uname -a: Linux myserver.foo.com 2.6.18-164.9.1.el5 #1 SMP Wed Dec 9 03:29 :54 EST 2009 i686 i686 i386 GNU/Linux
cat /etc/redhat-release: Red Hat Enterprise Linux Server 版本 5.4 (Tikanga)
gcc -v: gcc 版本 4.1.2 20080704 (Red Hat 4.1.2-46)
我是花了很长时间才弄清楚如何在这台机器上安装 gcc-3.2.2:
- 我似乎无法使用 gcc 4.1.2 编译器编译 3.2.2
- 我似乎找不到 3.2.2 安装通过 yum
- 我担心如果我手动 rpm 会发生什么
有什么建议吗?
编辑:感谢到目前为止的建议,但只是为了澄清 - 我提到的“遗留的东西”实际上并不是我公司的遗留的东西。这是一个第 3 方软件包,我无权访问代码(即使我这样做也不想更改它)
我想我会研究 chroot 的事情,因为此时要回到不同的 RHEL似乎令人心碎。
We just had our hosting provider build out a new RHEL 5 box for us to test some legacy stuff on:
uname -a: Linux myserver.foo.com 2.6.18-164.9.1.el5 #1 SMP Wed Dec 9 03:29:54 EST 2009 i686 i686 i386 GNU/Linux
cat /etc/redhat-release: Red Hat Enterprise Linux Server release 5.4 (Tikanga)
gcc -v: gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)
I'm having a hell of a time figuring out how to get gcc-3.2.2 installed on this machine:
- I can't seem to compile 3.2.2 with the gcc 4.1.2 compiler
- I can't seem to find a 3.2.2 installation via yum
- I'm afraid of what would happen if I rpm'd it manually
Any advice?
EDIT: thanks for the suggestions so far, but just to clarify - the "legacy stuff" I mentioned isn't actually my company's legacy stuff. It's a 3rd party package and I don't have access to the code (and wouldn't want to change it even if I did)
I guess I'll look into the chroot thing, because at this point going back to a different RHEL seems heartbreaking.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以尝试安装 RHEL 4 机器,它有 gcc 3.4,可以用来构建您的东西。然后您可以尝试在 RHEL 5 上运行二进制文件。
调试遗留代码以在 gcc 4 上工作可能会更容易。
You could try to install a RHEL 4 machine, it has gcc 3.4 which might work to build your stuff. Then you could try running the binaries on your RHEL 5.
It may just be easier to debug the legacy code to work on gcc 4.
我建议在 chroot 中手动安装 rpm。你必须在谷歌上大量搜索该方法,但理论上它应该运作良好。或者,您可以重写/更新您的遗留代码(是的,我知道说起来容易做起来难)。
What I would suggest is installing the rpm manually within a chroot. You would have to google a lot for the method but it should in theory work well. Alternatively you could just rewrite/update your legacy code (yes, I know it is easier said than done).