** Unable to load Mozilla for hosted mode ** (GWT & Ubuntu 8.10 Linux)

本文介绍了解决在Ubuntu上安装Google Web Toolkit (GWT) Eclipse插件时遇到的“无法加载Mozilla进行托管模式”错误的方法。通过安装特定版本的C++库和设置环境变量来指定默认浏览器的位置。

在ubuntu上面装google 的gwt的eclipse插件,运行会报这样的错误

The key to troubleshooting the problem is in the second line, libstdc++.so.5 to be exact.  It can’t find this C++ library.  Turns out the hosted browser needs libstdc++5, but the version currently installed on my 8.10 system is libstdc++6.  So you can either:

Open System->Administration->Synaptic Package Manager and install libstdc++5

打开 系统-》系统管理-》新立得软件管理包
or
At a console type: sudo apt-get install libstdc++5

或者 直接在终端输入  sudo apt-get install libstdc++5

Now you should be running in a hosted browser fine.

 

如果你没有将浏览器将的保存到系统变量中 可能还会出现下面的问题

Error on Compile/Browse
The second issue you might run into is GWT not recognizing your external browser.  You’ll know you have this problem after clicking on the Compile/Browse button.

You get an error that looks like:

The problem is that GWT can’t find your default installed browser (which is most likely firefox).  This is easy to fix:

  1. Open your .bashrc or .profile file, which is located in your home directory.  So type gedit ~/.bashrc or nano ~/.bashrc or however else you want to open it.  The reason I listed both files is because IMO the environment and pathing system of Ubuntu (and some other distros) is a spiderweb mess.  I modified my .bashrc, but I’m not sure if that’s best practice.
  2. Add this line to the bottom of the file: export GWT_EXTERNAL_BROWSER=/usr/bin/firefox
  3. Logout and log back in for the changes to take affect.

Now the Compile/Browse button should bring up your external browser.

Adding GWT to the path

Add PATH=”$HOME/projects/gwt-linux-1.5.3:$PATH” to your .bashrc (or .profile ) file.  Of course you might have to modify the directory name to point where you have GWT installed.  For this to take effect you’ll have to logout and log back in as well.  You can double check your path to see if GWT has been added by typing echo $PATH . Once you have GWT added to your path you’ll be able to execute projectCreator and applicationCreator from anywhere.

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值