上兵伐谋

“上兵伐谋,其次伐交,其次伐兵,其下攻城”。
posts - 35, comments - 32, trackbacks - 0, articles - 3

在Linux下安装Firefox

Posted on 2005-05-21 23:39 Kylin Bell 阅读(17011) 评论(8)  编辑 收藏 引用
从Mozilla的官方网站下了最新版的Firefox,是一个压缩包,文件名firefox-1.0.4.installer.tar.gz。解压出来,可执行文件是firefox-installe和firefox-installer-bin。

接下来的事情是,双击firefox-installer-bin,没有反应;切换到控制台下./firefox-installer,有错误提示了:


error while loading shared libraries: libstdc++.so.5:
cannot open shared object file: No such file or directory


上网找到一个关于libstdc++.so.5的解释:

libstdc++.so.5: cannot open shared object file: No such file or directory

Problem: An application is running on Linux 7.x which uses gcc 3.2.x. It gets one of the following error messages:

libstdc++.so.5: cannot open shared object file: No such file or directory
libgcc_s.so.1: cannot open shared object file: No such file or directory

Explanation: libstdc++.so.5 (the library for gcc 3.2.x) is installed in /usr/local/lib However, the system will only seach /usr/lib (where the 2.95.0 and other older libraries are stored).

Solution: Create symbolic links to make the libraries appear in the old folder:

ln -s /usr/local/lib/libstdc++.so.5 /usr/lib/libstdc++.so.5
ln -s /usr/local/lib/libgcc_s.so.1 /usr/lib/libgcc_s.so.1

如法建立两个链接,又出现了这样的错误:

error: Failed dependencies:
libstdc++.so.5()is needed by firefox-installer-bin
libstdc++.so.5(CXXABI_1.2)is needed by firefox-installer-bin
libstdc++.so.5(GLIBCPP_3.2)(64bit) is needed by firefox-installer-bin

重装libstdc++,依然如此。
上Google搜了下,在Fedora的邮件列表中找到了答案:

Fedora has moved beyond "libstdc++.so.5", in order to install you'll need to
install the "compat-libstdc++-8-3.3.4.2" rpm which should fulfill the requirements:

$ rpm -q --provides compat-libstdc++
libg++.so.2.7.2
libstdc++-libc6.1-1.so.2
libstdc++-libc6.1-1.so.2(GCC.INTERNAL)
libstdc++-libc6.2-2.so.3
libstdc++-libc6.2-2.so.3(GLIBCPP_2.96)
libstdc++-libc6.2-2.so.3(GLIBCPP_2.96_1)
libstdc++-libc6.2-2.so.3(GLIBC_2.0)
libstdc++-libc6.2-2.so.3(GLIBC_2.1)
libstdc++.so.2.7.2
libstdc++.so.2.8
libstdc++.so.2.9
libstdc++.so.2.9(GCC.INTERNAL)
libstdc++.so.5
libstdc++.so.5(CXXABI_1.2)
libstdc++.so.5(CXXABI_1.2.1)
libstdc++.so.5(CXXABI_1.2.2)
libstdc++.so.5(GLIBCPP_3.2)
libstdc++.so.5(GLIBCPP_3.2.1)
libstdc++.so.5(GLIBCPP_3.2.2)
libstdc++.so.5(GLIBCPP_3.2.3)
libstdc++.so.5(GLIBCPP_3.2.4)
compat-libstdc++ = 8-3.3.4.2

看来在RHEL中应该和Redora是一样的情况。于是安装compat-libstdc++,再双击firefox-installer-bin,OK,图形的安装界面出来了。

下一步。
下一步。
然后,再次出现问题:

Fatal Error [-618] Couldn't open xpistub library.

在国外一个论坛看到一个人的建议:

Use a terminal to launch the installer ( do "cd firefox-installer", then "./firefox-installer") and see what the output is in the terminal. It's likely it's a lib problem (glibc?) with rh ( 8.0 is an old distro, the precompiled firefox may not be able to run on that unless you do some hefty upgrading).

原来只能通过在命令行下./firefox-installer来启动安装程序,否则就会报错。于是打开终端,cd firefox && ./firefox-installer。OK!终于搞定。

Feedback

# re: 在Linux下安装Firefox  回复  更多评论   

2006-01-11 18:26 by crystal
老兄在哪里找的 compat-libstdc++-8-3.3.4.2 这个rpm包?

# re: 在Linux下安装Firefox  回复  更多评论   

2006-01-11 18:27 by crystal
给我一份好吗? crystalcool@21cn.com

谢谢!!

# re: 在Linux下安装Firefox  回复  更多评论   

2006-01-16 01:30 by Kylin Bell
现在的Firefox版本已经不需要这个安装过程了

# re: 在Linux下安装Firefox  回复  更多评论   

2006-02-13 15:49 by 周耀荣
在FC各个安装版本中的安装光盘中都有compat-libstdc*的软件包,找到它安装就可以了,安装前可以用rpm -qpl 来查询这一包的内容是否合适。

# re: 在Linux下安装Firefox  回复  更多评论   

2006-05-04 15:19 by sofian
Is there anyone know why FireFox didn't need that libstdc++ anymore ?

# re: 在Linux下安装Firefox  回复  更多评论   

2007-05-20 12:51 by ReeQoo
The firefox nolonger use the fun in libstdc++.so.5 thought it need libstdc++.so.5 nolonger.

# re: 在Linux下安装Firefox  回复  更多评论   

2007-09-12 15:04 by Anthem
补充: 在安装 compat-libstdc++-8-3.3.4.2时,可能 和原来 存在的 compat-libstdc++文件 发生冲突导致安装失败,
可以现卸载 原来的 compat-libstdc++,
rpm -e compat-libstdc++.
然后安装compat-libstdc++-8-3.3.4.2。

# re: 在Linux下安装Firefox  回复  更多评论   

2008-08-23 19:39 by why
为什么安装依赖关系的包的时候还需要依赖关系,那就没完了,是需要的那些依赖关系一个一个下载安装吗 ?谢谢
只有注册用户登录后才能发表评论。