解决在Ubuntu上搭建Android开发环境缺少WST包的问题

前言:之前写过一篇《Ubuntu 10.04安装Android开发环境》,每天都有不少访问量,估计很多就是遇到了这个问题,一直压在Evernote里没有翻出来,现在已转入Arch阵营,没有再次验证解决方案的正确性,完全参照印象和笔记,有问题尽管留言

平台:Ubuntu 10.10和Ubuntu 11.04,10.04(写那一篇日志的时候)无此问题

原因:Ubuntu下的Eclipse是Ubuntu社区打包的,非完整版,少了WST包的支持

现象:安装ADT的时候会提示类似如下错误(版本号可能会有不同):
[text gutter="false"]
Cannot complete the install because one or more required items could not be found. Software being installed: Android Development Tools 10.0.1.v201103111512-110841 (com.android.ide.eclipse.adt.feature.group 0.0.1.v201103111512-110841) Missing requirement: Android Development Tools 10.0.1.v201103111512-10841 (com.android.ide.eclipse.adt.feature.group 10.0.1.v201103111512-110841) requires ‘org.eclipse.wst.sse.core 0.0.0′ but it could not be found
[/text]
解决方案
方案1:直接从Eclipse官网下载完整的安装包
方案2:遵照以下菜单顺序或提示执行
[text gutter="false"]
1:Help –> Install New Software –> Add –> type ‘http://download.eclipse.org/releases/galileo’ in the Location –>OK
2:Help –> Install New Software –> Add –> type ‘http://dl.google.com/eclipse/plugin/3.5′ in the Location –> OK
3:Please make sure the option ‘Contact all updates sites during install to find required software’ is checked.
4:Restart Eclipse,Reinstall ADT
[/text]
相关参照
1)http://code.google.com/intl/es/eclipse/docs/faq.html#wstinstallerror
2)http://code.google.com/intl/es/eclipse/docs/install-eclipse-3.5.html

P.S.本文参与“第二届 Google 暑期大学生博客分享大赛 – 2011 Android 成长篇”,感谢大家支持

Shell 自动补全

1) /etc/passwd

It shows like this

in format of

Make sure the Command/shell is the “/bin/bash” and not the “/bin/sh” which may be the default value.

2) $HOME$/.bashrc or /etc/bash.bashrc
Make sure the code blew is not commented out.

3) Reference
http://www.cyberciti.biz/faq/understanding-etcpasswd-file-format/

使用密钥自动登录SSH(更新ssh-copy-id)

【更新】
lyxint提醒,发现了ssh-copy-id命令,第二步可以更简单的实现
ssh-copy-id -i ~/.ssh/id_rsa.pub username@hostname
其中username为用户名,hostname为服务器\VPS的IP\地址

1)在本机生成公钥密钥
ssh-keygen -t rsa
一路回车,选择默认路径即可,默认路径为~/.ssh/

2)将本地公钥上传至服务器
cat ~/.ssh/id_rsa.pub|ssh username@hostname ‘sh -c “cat – >>~/.ssh/authorized_keys”‘
其中username为用户名,hostname为服务器\VPS的IP\地址

3)ssh设置文件的几点说明(一般是默认即可)
路径:/etc/ssh/sshd_config
相关行:
PubkeyAuthentication yes #开启公钥验证
#AuthorizedKeysFile %h/.ssh/authorized_keys #公钥的位置,建议使用默认路径