简体   繁体   English

Linux的Aptana安装问题(CentsOS 5)

[英]Aptana install problem with Linux (CentsOS 5)

After I installed Aptana (install directory: /usr/share/aptana ) 在我安装Aptana之后(安装目录:/ usr / share / aptana)

I keep getting errors like this: 我不断收到这样的错误:

An SWT Error has occurred, you are recommended to exit the workbench. 发生SWT错误,建议您退出工作台。 Subsequent errors may happen and terminate the workbench without warning. 可能会发生后续错误,并在没有警告的情况下终止工作台。 See the .log file for more details. 有关更多详细信息,请参见.log文件。

looking in the logs I see this: 查看日志,我看到以下内容:

!MESSAGE No more handles (java.lang.UnsatisfiedLinkError: /root/.Aptana/Aptana Studio/configuration/org.eclipse.osgi/bundles/72/1/.cp/libswt-mozilla-gtk-3236.so: libxpcom.so: cannot open shared object file: No such file or directory) !MESSAGE不再处理(java.lang.UnsatisfiedLinkError:/root/.Aptana/Aptana Studio / configuration / org.eclipse.osgi / bundles / 72/1 / .cp / libswt-mozilla-gtk-3236.so:libxpcom。因此:无法打开共享库文件:无此类文件或目录)

 !STACK 0 org.eclipse.swt.SWTError: No more handles 

(java.lang.UnsatisfiedLinkError: /root/.Aptana/Aptana Studio/configuration/org.eclipse.osgi/bundles/72/1/.cp/libswt-mozilla-gtk-3236.so: libxpcom.so: cannot open shared object file: No such file or directory) (java.lang.UnsatisfiedLinkError:/root/.Aptana/Aptana Studio / configuration / org.eclipse.osgi / bundles / 72/1 / .cp / libswt-mozilla-gtk-3236.so:libxpcom.so:无法打开共享目标文件:无此类文件或目录)

Well after search the forums and other sites for about an hour, people suggested I install these packages. 在搜索论坛和其他站点大约一个小时后,人们建议我安装这些软件包。

* yum install gtk2-devel
* yum install xulrunner
* yum install libstdc*
* yum install gtk2*
* yum install libswt3-gtk2*
* yum install compat-libstdc++-33 

I had some already installed and I don't know if they are really required but there they are for you. 我已经安装了一些软件,但我不知道它们是否确实需要,但确实适合您。

After all that it still didn't work 毕竟它仍然没有用

Ubuntu 12.04 does not seem to have the libgtkembedmoz.so file anywhere out of the box. Ubuntu 12.04似乎没有开箱即用的libgtkembedmoz.so文件。

You can install kompozer and use it. 您可以安装kompozer并使用它。

sudo apt-get install kompozer

export MOZILLA_FIVE_HOME=/usr/lib/kompozer

I used the Create a Launcher application on desktop and download the 我在桌面上使用了创建启动器应用程序并下载了

  • yum install gtk2-devel 百胜安装gtk2-devel
  • yum install xulrunner 百胜安装xulrunner
  • yum install libstdc* 百胜安装libstdc *
  • yum install gtk2* 百胜安装gtk2 *
  • yum install libswt3-gtk2* 百胜安装libswt3-gtk2 *
  • yum install compat-libstdc++-33 百胜安装compat-libstdc ++-33

I came across this post . 我碰到了这个帖子 in the post it has a file you need to download called aptana.sh . 在帖子中有一个需要下载的文件aptana.sh

Here is the code if the file is not available: 如果文件不可用,则代码如下:

/*************** START OF FILE **************/

#!/bin/bash

# Set path for the Mozilla SWT binding

MOZILLA_FIVE_HOME=${MOZILLA_FIVE_HOME%*/}
if false && [ -n "$MOZILLA_FIVE_HOME" -a -e $MOZILLA_FIVE_HOME/libgtkembedmoz.so ]; then
:
elif [ -e /usr/lib/mozilla/libgtkembedmoz.so ]; then
export MOZILLA_FIVE_HOME=/usr/lib/mozilla
elif [ -e /usr/lib/firefox/libgtkembedmoz.so ]; then
export MOZILLA_FIVE_HOME=/usr/lib/firefox
elif [ -e /usr/lib/xulrunner/libgtkembedmoz.so ]; then
export MOZILLA_FIVE_HOME=/usr/lib/xulrunner
elif [ -e /usr/lib/mozilla-firefox/libgtkembedmoz.so ]; then
export MOZILLA_FIVE_HOME=/usr/lib/mozilla-firefox
elif [ -e /usr/lib/mozilla/libgtkembedmoz.so ]; then
export MOZILLA_FIVE_HOME=/usr/lib/mozilla
else
$DIALOGW \
--title="Integrated browser support not working" \
--text="This Eclipse build doesn't have support for the integrated browser."
[ $? -eq 0 ] || exit 1
fi
# libraries from the mozilla choosen take precedence
LD_LIBRARY_PATH=$MOZILLA_FIVE_HOME${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}

# Do the actual launch of Aptana Studio
exec ./AptanaStudio


/*************** END OF FILE **************/

Still didn't work so I decided to see if the file it was trying to call existed. 仍然无法正常工作,因此我决定查看要调用的文件是否存在。 the command for the file name in: 文件名的命令在:

locate libgtkembedmoz.so 找到libgtkembedmoz.so

it found it so I added the condition to the script and now it works great, YEAH!! 它找到了它,所以我在脚本中添加了条件,现在它很好用,是的!

elif [ -e /usr/lib/esc-1.0.0/xulrunner/libgtkembedmoz.so ]; then export MOZILLA_FIVE_HOME=/usr/lib/esc-1.0.0/xulrunner

Let me know of any other findings that might help out. 让我知道其他可能有帮助的发现。

Thanks, --Phill 谢谢--Phill

Okay so after much digging around I found that Aptana needs libgtkembedmoz.so to run (Aptana team please fix this, just include the file in the next build please!!!). 好吧,经过大量的挖掘,我发现Aptana需要libgtkembedmoz.so才能运行(Aptana团队请解决此问题,请将文件包括在下一个版本中!!!)。

Work around: 解决:

Well xulrunner (the new version) doesn't include libgtkembedmoz.so file. 好吧xulrunner(新版本)不包含libgtkembedmoz.so文件。 So after much Googling I found that Thunderbird does. 因此,经过大量Google搜索之后,我发现Thunderbird确实可以。 So I YUM install thunderbird and went to check if the file libgtkembedmoz.so was there. 因此,我YUM安装了雷鸟,并检查了文件libgtkembedmoz.so是否存在。 (BTW: thunderbird version 2.0.0.18 on CentOS 5). (顺便说一句:CentOS 5上的雷鸟版本2.0.0.18)。 Yeah it's there. 是的,在那里。

So I have a script that looks for the libgtkembedmoz.so file 所以我有一个寻找libgtkembedmoz.so文件的脚本

#!/bin/bash

# Set path for the Mozilla SWT binding
MOZILLA_FIVE_HOME=${MOZILLA_FIVE_HOME%*/}
if false && [ -n "$MOZILLA_FIVE_HOME" -a -e $MOZILLA_FIVE_HOME/libgtkembedmoz.so ]; then
:
elif [ -e /usr/lib/mozilla/libgtkembedmoz.so ]; then
export MOZILLA_FIVE_HOME=/usr/lib/mozilla
elif [ -e /usr/lib/firefox/libgtkembedmoz.so ]; then
export MOZILLA_FIVE_HOME=/usr/lib/firefox
elif [ -e /usr/lib/xulrunner/libgtkembedmoz.so ]; then
export MOZILLA_FIVE_HOME=/usr/lib/xulrunner
elif [ -e /usr/lib/esc-1.0.0/xulrunner/libgtkembedmoz.so ]; then
export MOZILLA_FIVE_HOME=/usr/lib/esc-1.0.0/xulrunner
elif [ -e /usr/lib/mozilla-firefox/libgtkembedmoz.so ]; then
export MOZILLA_FIVE_HOME=/usr/lib/mozilla-firefox
elif [ -e /usr/lib/mozilla/libgtkembedmoz.so ]; then
export MOZILLA_FIVE_HOME=/usr/lib/mozilla
elif [ -e /usr/lib/thunderbird-2.0.0.18/libgtkembedmoz.so ]; then
export MOZILLA_FIVE_HOME=/usr/lib/thunderbird-2.0.0.18
else
$DIALOGW \
--title="Integrated browser support not working" \
--text="This Eclipse build doesn't have support for the integrated browser."
[ $? -eq 0 ] || exit 1
fi

# libraries from the mozilla choosen take precedence
LD_LIBRARY_PATH=$MOZILLA_FIVE_HOME${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}

# Do the actual launch of Aptana Studio
exec ./AptanaStudio

make it executable (chmod 755 scriptname) and run. 使它可执行(chmod 755脚本名称)并运行。

Note: 注意:

Just cjeck to make sure you have the right version of the program and/or that the path works. 只需单击cjeck,以确保您具有该程序的正确版本和/或该路径有效。

[user@machine]# ls /usr/lib/thunderbird-2.0.0.18/libgtkembedmoz.so /usr/lib/thunderbird-2.0.0.18/libgtkembedmoz.so

So if you have thunerbird 2.0.0.14 please make the change in the script as well. 因此,如果您有thunerbird 2.0.0.14,请同时在脚本中进行更改。

Hope this help ;-) 希望这个帮助;-)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM