mac os x 10.9.2 Mavericks环境配置

更新系统到mac os x 10.9.2 Mavericks,问题一大堆,一个个解决。

svn默认升级到了1.7

# 查看版本
$svn --version
svn, version 1.7.10 (r1485443)
   compiled Aug 13 2013, 15:31:22


解决方案:
1.7不兼容1.6的本地仓库,但可以兼容1.6服务端,重新co代码即可。


java没了

10.8版本时,曾自行安装过java,修改一下JAVA_HOME目录即可
export JAVA_HOME=/Library/Java/JavaVirtualMachines/1.6.0_65-b14-462.jdk/Contents/Home


maven没了
使用brew安装maven 2.2,结果官网掉链子,找不到这个文件
$ brew versions maven
Warning: brew-versions is unsupported and may be removed soon.
Please use the homebrew-versions tap instead:
  https://github.com/Homebrew/homebrew-versions
3.1.1    git checkout 3e039d4 Library/Formula/maven.rb
3.1.0    git checkout f160fa9 Library/Formula/maven.rb
3.0.5    git checkout b4725ca Library/Formula/maven.rb
3.0.4    git checkout d7a19f2 Library/Formula/maven.rb
3.0.3    git checkout 14e4db3 Library/Formula/maven.rb
3.0.2    git checkout 03b288a Library/Formula/maven.rb
3.0.1    git checkout 83857d6 Library/Formula/maven.rb
3.0      git checkout 09a0264 Library/Formula/maven.rb
2.2.1    git checkout d40d419 Library/Formula/maven.rb
$ cd `brew --prefix`
$ git checkout d40d419 Library/Formula/maven.rb
$ brew install maven
==> Downloading http://www.apache.org/dist/maven/binaries/apache-maven-2.2.1-bin.tar.gz
curl: (22) The requested URL returned error: 404 Not Found
Error: Download failed: http://www.apache.org/dist/maven/binaries/apache-maven-2.2.1-bin.tar.gz

#  apache官网不再支持maven2,并移动下载链接到其它目录
# 修改安装脚本中 下载文件的url,再次安装即可
$ vi Library/Formula/maven.rb
# 修改第4行如下
  url 'http://archive.apache.org/dist/maven/binaries/apache-maven-2.2.1-bin.tar.gz'

$ brew install maven
Warning: A newer Command Line Tools release is available
Update them from Software Update in the App Store.
==> Downloading http://www.apache.org/dist/maven/binaries/apache-maven-2.2.1-bin.tar.gz
######################################################################## 100.0%
Warning: MD5 support is deprecated and will be removed in a future version.
Please switch this formula to SHA1 or SHA256.

# 设置环境变量,使用brew安装的maven环境变量有点特别,记得带上后面的libexec
$vi ~/.bash_profile
#添加2行
export MAVEN_HOME=/usr/local/Cellar/maven/2.2.1/libexec
export M2_HOME=$MAVEN_HOME


/home 目录问题

以前为了方便,做了一个/home/的软链接,加回来即可
$ sudo ln -s /Users/username/home/ /home

你可能感兴趣的:(Mac OS X)