« FireFox将推出手机浏览器 | Main | Mozilla发布“火狐1.0.4”修补两处高危漏洞 »

Firefox在Linux下应该如此安装

关于在linux中的Firefox安装更新版本或者是想改用中文接口版本的问题,在此作一个汇整以防往后的人通常都会碰到相同的情况。

观念一 firefox 在 linux 里是不用安装的,故没有安装程序,况且linux不是一个以窗口接口著称的操作系统,指令才是能了解linux真正意含的方法 以 tar -xzvf firefox-X.X.X.X.tar.gz 解压在某个目录后在那目录下直接运行 ./firefox 就可以了

观念二 linux各发行版本会有不同的更新方法,以各家厂商网站为准,如RedHat的rpm可以用yum直接在线安装或下载rpm档案装,又例如Debian的dpkg可以用apt-get在线安装或下载deb档安装。而各家版本通常更新速度是数一数二慢的

观念三 部份版本如Mandriva会出现./firefox-bin: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory 所以需要先加装libstdc++5 套件(方法很多可利用各家更新程序)才可运行 ./firefox

观念四 自己下载的Firefox是会跟Mandriva的预设输入法scim相冲 有两种方法解决:

1.请编辑Firefox的执行档,在第一行加上以下一句 export GTK_IM_MODULE=xim
不知到加在哪的请找到类似有export句子的加在前面即可

2.请编辑/etc/gtk-2.0/gtk-immodules 然后在关于scim那两句(通常是最后两句)的前面加上"#"号,就可以了

观念五 我在重新安装libstdc++5-devel - Header files and libraries for C++ development后
终于可以见到firerfox2.0的画面了
但每在网页要载完时
竟出现:

The program 'Gecko' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
(Details: serial 155 error_code 8 request_code 146 minor_code 3)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)

然后firefox自动关闭 问题所在应该是在xorg.conf里加载了

Section "Extensions"
Option "Composite" "Enable"
EndSection

看来这应该算是一个bug了

观念六 mandriva 原先安装的是 libstdc++6 - GNU C++ library
故再加装libstdc++5 - GNU C++ library 再去执行firefox时 出现了内存配置错误之讯息或者导致firefox里头无法打中文 这是Mandriva预设的输入法scim跟Firefox冲突,请参考观念四

结论 以Mandriva2007为范例 使用超级用户权限

0 装好libstdc++5套件
1 先下载linux版本的FF 并解压缩至/opt下(这我就不知道为何大家都如此做,知悉知人可以回答)
2 卸载原来的 firefox 的配置文件 rm -rf ~/.mozilla (删除前做好作备份用tar之类的)
3 cd 切到解压的目录下
4 编辑Firefox的执行档,在第一行加上以下一句 export GTK_IM_MODULE=xim
5 运行 ./firefox
6 为以后方便最好作个连结到 /usr/bin 目录中

ln -sf /opt/firefox/firefox /usr/bin/firefox及
ln -sf /opt/firefox/firefox /usr/bin/mozilla-firefox

就这样大功告成了

TrackBack

TrackBack URL for this entry:
http://firefox.delphichm.com/MT/mt-tb.cgi/675

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)