ラベル homebrew の投稿を表示しています。 すべての投稿を表示
ラベル homebrew の投稿を表示しています。 すべての投稿を表示

2015年5月9日土曜日

macにhomebrewでpython入れようとしたらエラー出たときの対応

macにhomebrewでpython入れようとしたらエラー出たので、そのときの対応です。

$ brew install python
==> Downloading http://www.python.org/ftp/python/2.7.7/Python-2.7.7.tgz
Already downloaded: /Library/Caches/Homebrew/python-2.7.7.tgz
==> ./configure --prefix=/usr/local/Cellar/python/2.7.7_1 --enable-ipv6 --datarootdir=/usr/local/Cellar/python/2.7.7_1/share --
==> make
==> make install PYTHONAPPSDIR=/usr/local/Cellar/python/2.7.7_1
==> make frameworkinstallextras PYTHONAPPSDIR=/usr/local/Cellar/python/2.7.7_1/share/python
==> Downloading https://pypi.python.org/packages/source/s/setuptools/setuptools-4.0.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/python--setuptools-4.0.1.tar.gz
Error: SHA1 mismatch
Expected: a43549f4a01f314bf54567628f8de7d1c03d5930
Actual: 6d417376509eee44c1da34692fb5d805fd2915c6
Archive: /Library/Caches/Homebrew/python--setuptools-4.0.1.tar.gz
To retry an incomplete download, remove the file above.

SHA-1 mismatchということなので、Archiveのファイルが古いようです。
homebrewのupdateをしてみました。

$ brew update
==> Updated Formulae
python

homebrewをupdateした後だと、無事にインストールできました。
$ brew install python
==> Installing dependencies for python: readline, sqlite, openssl
==> Installing python dependency: readline
==> Downloading https://homebrew.bintray.com/bottles/readline-6.3.8.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring readline-6.3.8.yosemite.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.

Mac OS X provides similar software, and installing this software in
parallel can cause all kinds of trouble.

OS X provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/readline/lib
    CPPFLAGS: -I/usr/local/opt/readline/include

==> Summary
🍺  /usr/local/Cellar/readline/6.3.8: 40 files, 2.1M
==> Installing python dependency: sqlite
==> Downloading https://homebrew.bintray.com/bottles/sqlite-3.8.9.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring sqlite-3.8.9.yosemite.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.

Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.

OS X provides an older sqlite3.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/sqlite/lib
    CPPFLAGS: -I/usr/local/opt/sqlite/include

==> Summary
🍺  /usr/local/Cellar/sqlite/3.8.9: 9 files, 2.2M
==> Installing python dependency: openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2a-1.yosemite.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring openssl-1.0.2a-1.yosemite.bottle.1.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /usr/local/etc/openssl/certs

and run
  /usr/local/opt/openssl/bin/c_rehash

This formula is keg-only, which means it was not symlinked into /usr/local.

Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.

Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/openssl/lib
    CPPFLAGS: -I/usr/local/opt/openssl/include

==> Summary
🍺  /usr/local/Cellar/openssl/1.0.2a-1: 463 files, 18M
==> Installing python
==> Downloading https://homebrew.bintray.com/bottles/python-2.7.9.yosemite.bottle.13.tar.gz
######################################################################## 100.0%
==> Pouring python-2.7.9.yosemite.bottle.13.tar.gz
==> Caveats
Pip and setuptools have been installed. To update them
  pip install --upgrade pip setuptools

You can install Python packages with
  pip install 

They will install into the site-package directory
  /usr/local/lib/python2.7/site-packages

See: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Homebrew-and-Python.md

.app bundles were installed.
Run `brew linkapps python` to symlink these to /Applications.
==> /usr/local/Cellar/python/2.7.9/bin/python -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/
==> /usr/local/Cellar/python/2.7.9/bin/python -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/
==> Summary
🍺  /usr/local/Cellar/python/2.7.9: 4808 files, 77M

2015年3月23日月曜日

macにwiresharkをhomebrewで入れる

homebrew便利です。wiresharkも簡単に入れられました。
MacのバージョンはMavericksです。

$ brew install wireshark --with-qt
==> Installing dependencies for wireshark: gettext, libffi, glib, libtasn1, gmp, nettle, gnutls, libgpg-error, libgcrypt, d-bus, geoip, c-ares, qt
==> Installing wireshark dependency: gettext
==> Downloading https://homebrew.bintray.com/bottles/gettext-0.19.4.mavericks.bottle.tar.gz
######################################################################## 100.0%
==> Pouring gettext-0.19.4.mavericks.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.
 
Mac OS X provides similar software, and installing this software in
parallel can cause all kinds of trouble.
 
OS X provides the BSD gettext library and some software gets confused if both are in the library path.
 
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
 
    LDFLAGS:  -L/usr/local/opt/gettext/lib
    CPPFLAGS: -I/usr/local/opt/gettext/include
 
==> Summary
🍺  /usr/local/Cellar/gettext/0.19.4: 1920 files,  21M
==> Installing wireshark dependency: libffi
==> Downloading https://homebrew.bintray.com/bottles/libffi-3.0.13.mavericks.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libffi-3.0.13.mavericks.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.
 
Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.
 
Some formulae require a newer version of libffi.
 
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
 
    LDFLAGS:  -L/usr/local/opt/libffi/lib
 
==> Summary
🍺  /usr/local/Cellar/libffi/3.0.13: 13 files, 388K
==> Installing wireshark dependency: glib
==> Downloading https://homebrew.bintray.com/bottles/glib-2.42.2.mavericks.bottle.tar.gz
######################################################################## 100.0%
==> Pouring glib-2.42.2.mavericks.bottle.tar.gz
🍺  /usr/local/Cellar/glib/2.42.2: 410 files,  17M
==> Installing wireshark dependency: libtasn1
==> Downloading https://homebrew.bintray.com/bottles/libtasn1-4.2.mavericks.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libtasn1-4.2.mavericks.bottle.tar.gz
🍺  /usr/local/Cellar/libtasn1/4.2: 55 files, 568K
==> Installing wireshark dependency: gmp
==> Downloading https://homebrew.bintray.com/bottles/gmp-6.0.0a.mavericks.bottle.tar.gz
######################################################################## 100.0%
==> Pouring gmp-6.0.0a.mavericks.bottle.tar.gz
🍺  /usr/local/Cellar/gmp/6.0.0a: 15 files, 3.2M
==> Installing wireshark dependency: nettle
==> Downloading https://homebrew.bintray.com/bottles/nettle-2.7.1.mavericks.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring nettle-2.7.1.mavericks.bottle.1.tar.gz
🍺  /usr/local/Cellar/nettle/2.7.1: 66 files, 1.7M
==> Installing wireshark dependency: gnutls
==> Downloading https://homebrew.bintray.com/bottles/gnutls-3.3.13.mavericks.bottle.tar.gz
######################################################################## 100.0%
==> Pouring gnutls-3.3.13.mavericks.bottle.tar.gz
🍺  /usr/local/Cellar/gnutls/3.3.13: 1020 files, 8.8M
==> Installing wireshark dependency: libgpg-error
==> Downloading https://homebrew.bintray.com/bottles/libgpg-error-1.18.mavericks.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libgpg-error-1.18.mavericks.bottle.tar.gz
🍺  /usr/local/Cellar/libgpg-error/1.18: 17 files, 332K
==> Installing wireshark dependency: libgcrypt
==> Downloading https://homebrew.bintray.com/bottles/libgcrypt-1.6.3.mavericks.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libgcrypt-1.6.3.mavericks.bottle.tar.gz
🍺  /usr/local/Cellar/libgcrypt/1.6.3: 16 files, 1.3M
==> Installing wireshark dependency: d-bus
==> Downloading https://homebrew.bintray.com/bottles/d-bus-1.8.14.mavericks.bottle.tar.gz
######################################################################## 100.0%
==> Pouring d-bus-1.8.14.mavericks.bottle.tar.gz
==> Caveats
To have launchd start d-bus at login:
    ln -sfv /usr/local/opt/d-bus/*.plist ~/Library/LaunchAgents
Then to load d-bus now:
    launchctl load ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist
==> /usr/local/Cellar/d-bus/1.8.14/bin/dbus-uuidgen --ensure=/usr/local/var/lib/dbus/machine-id
==> Summary
🍺  /usr/local/Cellar/d-bus/1.8.14: 39 files, 2.0M
==> Installing wireshark dependency: geoip
==> Downloading https://homebrew.bintray.com/bottles/geoip-1.6.5.mavericks.bottle.tar.gz
######################################################################## 100.0%
==> Pouring geoip-1.6.5.mavericks.bottle.tar.gz
🍺  /usr/local/Cellar/geoip/1.6.5: 16 files, 736K
==> Installing wireshark dependency: c-ares
==> Downloading https://homebrew.bintray.com/bottles/c-ares-1.10.0.mavericks.bottle.tar.gz
######################################################################## 100.0%
==> Pouring c-ares-1.10.0.mavericks.bottle.tar.gz
🍺  /usr/local/Cellar/c-ares/1.10.0: 57 files, 540K
==> Installing wireshark dependency: qt
==> Downloading https://homebrew.bintray.com/bottles/qt-4.8.6.mavericks.bottle.6.tar.gz
######################################################################## 100.0%
==> Pouring qt-4.8.6.mavericks.bottle.6.tar.gz
==> Caveats
We agreed to the Qt opensource license for you.
If this is unacceptable you should uninstall.
 
.app bundles were installed.
Run `brew linkapps qt` to symlink these to /Applications.
==> Summary
🍺  /usr/local/Cellar/qt/4.8.6: 2790 files, 122M
==> Installing wireshark
==> Downloading https://www.wireshark.org/download/src/all-versions/wireshark-1.12.4.tar.bz2
######################################################################## 100.0%
==> Patching
patching file configure
Hunk #1 succeeded at 16946 (offset 243 lines).
==> ./configure --disable-silent-rules --prefix=/usr/local/Cellar/wireshark/1.12.4 --with-gnutls --disable-gtktest --with-qt
==> make
==> make install
==> Caveats
If your list of available capture interfaces is empty
(default OS X behavior), try the following commands:
 
  curl https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3373 -o ChmodBPF.tar.gz
  tar zxvf ChmodBPF.tar.gz
  open ChmodBPF/Install\ ChmodBPF.app
 
This adds a launch daemon that changes the permissions of your BPF
devices so that all users in the 'admin' group - all users with
'Allow user to administer this computer' turned on - have both read
and write access to those devices.
 
See bug report:
  https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3760
==> Summary
🍺  /usr/local/Cellar/wireshark/1.12.4: 270 files,  64M, built in 3.8 minutes

wiresharkの起動は以下のコマンドでやります。
$ wireshark-qt

参考URL
http://momijiame.tumblr.com/post/43785788212/mac-os-x-mountain-lion-homebrew-wireshark
http://stackoverflow.com/questions/26242156/install-wireshark-on-macos-x-via-brew

2014年6月6日金曜日

Macにpgadminをhomebrewで入れる

ちょっとpostgresqlにつなぐ必要ができたのですが、
あまりに何のDBかわからず怖すぎたのでpgadminⅢを入れてつないでみました。

Macにはhomebrewという便利なのがあるので、まずはあるか検索。
$ brew search pgadmin
homebrew/php/phppgadmin
普通に検索するとphpのやつが引っかかります。
なのでvirtualboxとかで有名なcaskでも検索。
$ brew cask search pgadmin
==> Partial matches
pgadmin3
引っかかりました。さすがですね。
早速インストールしてみます。
$ brew cask install pgadmin3
==> Downloading http://ftp.postgresql.org/pub/pgadmin3/release/v1.18.1/osx/pgadmin3-1.18.1.dmg
######################################################################## 100.0%
==> Symlinking App 'pgAdmin3.app' to '/Users/xxxx/Applications/pgAdmin3.app'
🍺  pgadmin3 installed to '/opt/homebrew-cask/Caskroom/pgadmin3/1.18.1' (412 files, 65M)
完了すると、書いてあるようにユーザーのアプリケーションフォルダにappファイルができます。
そこから実行してみると、ちゃんと起動しました。
homebrew便利ですね。

2014年5月29日木曜日

homebrewでmavenもインストール

普段はeclipseでm2eを使っているので、
maven入れないでも何とかなるので入れてなかったのですが、
用意してあるプログラムがmvnコマンド実行するタイプのものだったので、
homebrewでmaven入れてみました。

まずはhomebrew入れられるのか確認してみるといくつか出てくる。
$ brew search maven
maven      maven-shell  maven2       maven30     maven31
homebrew/versions/maven2     homebrew/versions/maven30   homebrew/versions/maven31

とりあえず上の5つをbrew infoで確認してみると、
「maven」のやつが最新版のようです。
$ brew info maven2
maven2: stable 2.2.1
http://maven.apache.org/
Not installed
From: https://github.com/Homebrew/homebrew/commits/master/Library/Formula/maven2.rb
==> Caveats
WARNING: This older version will conflict with Maven if installed at the
same time.
 
$ brew info maven30
maven30: stable 3.0.5
http://maven.apache.org/
Not installed
From: https://github.com/Homebrew/homebrew/commits/master/Library/Formula/maven30.rb
==> Caveats
WARNING: This older version will conflict with Maven if installed at the
same time.
 
$ brew info maven31
maven31: stable 3.1.1
http://maven.apache.org/
Not installed
From: https://github.com/Homebrew/homebrew/commits/master/Library/Formula/maven31.rb
==> Caveats
WARNING: This older version will conflict with Maven if installed at the
same time.
 
$ brew info maven
maven: stable 3.2.1
http://maven.apache.org/
Not installed
From: https://github.com/Homebrew/homebrew/commits/master/Library/Formula/maven.rb
 
$ brew info maven-shell
maven-shell: stable 1.1.0
http://shell.sonatype.org/
Not installed
From: https://github.com/Homebrew/homebrew/commits/master/Library/Formula/maven-shell.rb

versionsがつくやつはやはりtapしてないのでエラーになる。
$ brew info homebrew/versions/maven2
Error: No available formula for maven2 
Please tap it and then try again: brew tap homebrew/versions 

なのでtapしてみると、すごくWarning出た。
$ brew tap homebrew/versions
Cloning into '/usr/local/Library/Taps/homebrew/homebrew-versions'...
remote: Reusing existing pack: 2077, done.
remote: Counting objects: 2, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 2079 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (2079/2079), 664.37 KiB | 338.00 KiB/s, done.
Resolving deltas: 100% (1148/1148), done.
Checking connectivity... done.
Warning: Could not tap homebrew/homebrew-versions/allegro4 over 
Warning: Could not tap homebrew/homebrew-versions/allegro5 over 
Warning: Could not tap homebrew/homebrew-versions/ansible14 over 
Warning: Could not tap homebrew/homebrew-versions/antlr2 over 
Warning: Could not tap homebrew/homebrew-versions/appledoc20 over 
Warning: Could not tap homebrew/homebrew-versions/appledoc21 over 
Warning: Could not tap homebrew/homebrew-versions/appledoc22 over 
Warning: Could not tap homebrew/homebrew-versions/autoconf213 over 
Warning: Could not tap homebrew/homebrew-versions/autoconf264 over 
Warning: Could not tap homebrew/homebrew-versions/automake112 over 
Warning: Could not tap homebrew/homebrew-versions/bash-completion2 over 
Warning: Could not tap homebrew/homebrew-versions/bison27 over 
Warning: Could not tap homebrew/homebrew-versions/boost149 over 
Warning: Could not tap homebrew/homebrew-versions/cassandra-0.6 over 
Warning: Could not tap homebrew/homebrew-versions/cassandra10 over 
Warning: Could not tap homebrew/homebrew-versions/cassandra12 over 
Warning: Could not tap homebrew/homebrew-versions/clojure14 over 
Warning: Could not tap homebrew/homebrew-versions/cloog-ppl015 over 
Warning: Could not tap homebrew/homebrew-versions/cloog018 over 
Warning: Could not tap homebrew/homebrew-versions/coq83 over 
Warning: Could not tap homebrew/homebrew-versions/cvsps2 over 
Warning: Could not tap homebrew/homebrew-versions/doxygen1831 over 
Warning: Could not tap homebrew/homebrew-versions/drush4 over 
Warning: Could not tap homebrew/homebrew-versions/drush5 over 
Warning: Could not tap homebrew/homebrew-versions/eigen2 over 
Warning: Could not tap homebrew/homebrew-versions/elasticsearch-0.20 over 
Warning: Could not tap homebrew/homebrew-versions/elasticsearch090 over 
Warning: Could not tap homebrew/homebrew-versions/erlang-r13 over 
Warning: Could not tap homebrew/homebrew-versions/erlang-r14 over 
Warning: Could not tap homebrew/homebrew-versions/erlang-r15 over 
Warning: Could not tap homebrew/homebrew-versions/gawk3 over 
Warning: Could not tap homebrew/homebrew-versions/gcc43 over 
Warning: Could not tap homebrew/homebrew-versions/gcc44 over 
Warning: Could not tap homebrew/homebrew-versions/gcc45 over 
Warning: Could not tap homebrew/homebrew-versions/gcc46 over 
Warning: Could not tap homebrew/homebrew-versions/gcc47 over 
Warning: Could not tap homebrew/homebrew-versions/gcc48 over 
Warning: Could not tap homebrew/homebrew-versions/gcc49 over 
Warning: Could not tap homebrew/homebrew-versions/giflib5 over 
Warning: Could not tap homebrew/homebrew-versions/git-tf-2.0.2 over 
Warning: Could not tap homebrew/homebrew-versions/glfw2 over 
Warning: Could not tap homebrew/homebrew-versions/glfw3 over 
Warning: Could not tap homebrew/homebrew-versions/gmp4 over 
Warning: Could not tap homebrew/homebrew-versions/grails13 over 
Warning: Could not tap homebrew/homebrew-versions/grails20 over 
Warning: Could not tap homebrew/homebrew-versions/grails21 over 
Warning: Could not tap homebrew/homebrew-versions/grails22 over 
Warning: Could not tap homebrew/homebrew-versions/gsl114 over 
Warning: Could not tap homebrew/homebrew-versions/gst-ffmpeg010 over 
Warning: Could not tap homebrew/homebrew-versions/gst-plugins-bad010 over 
Warning: Could not tap homebrew/homebrew-versions/gst-plugins-base010 over 
Warning: Could not tap homebrew/homebrew-versions/gst-plugins-good010 over 
Warning: Could not tap homebrew/homebrew-versions/gst-plugins-ugly010 over 
Warning: Could not tap homebrew/homebrew-versions/gst-python010 over 
Warning: Could not tap homebrew/homebrew-versions/gst-rtsp010 over 
Warning: Could not tap homebrew/homebrew-versions/gstreamer010 over 
Warning: Could not tap homebrew/homebrew-versions/guile18 over 
Warning: Could not tap homebrew/homebrew-versions/hadoop0202 over 
Warning: Could not tap homebrew/homebrew-versions/hadoop121 over 
Warning: Could not tap homebrew/homebrew-versions/hdf4 over 
Warning: Could not tap homebrew/homebrew-versions/imagemagick-ruby186 over 
Warning: Could not tap homebrew/homebrew-versions/isl011 over 
Warning: Could not tap homebrew/homebrew-versions/jboss-as5 over 
Warning: Could not tap homebrew/homebrew-versions/jboss-forge1 over 
Warning: Could not tap homebrew/homebrew-versions/jenkins-lts over 
Warning: Could not tap homebrew/homebrew-versions/jetty76 over 
Warning: Could not tap homebrew/homebrew-versions/jetty8 over 
Warning: Could not tap homebrew/homebrew-versions/jpeg6b over 
Warning: Could not tap homebrew/homebrew-versions/jpeg9 over 
Warning: Could not tap homebrew/homebrew-versions/json-c010 over 
Warning: Could not tap homebrew/homebrew-versions/leptonica169 over 
Warning: Could not tap homebrew/homebrew-versions/libcouchbase1 over 
Warning: Could not tap homebrew/homebrew-versions/libgee08 over 
Warning: Could not tap homebrew/homebrew-versions/libmpc08 over 
Warning: Could not tap homebrew/homebrew-versions/libotr4 over 
Warning: Could not tap homebrew/homebrew-versions/libpng12 over 
Warning: Could not tap homebrew/homebrew-versions/llvm-gcc28 over 
Warning: Could not tap homebrew/homebrew-versions/llvm31 over 
Warning: Could not tap homebrew/homebrew-versions/llvm32 over 
Warning: Could not tap homebrew/homebrew-versions/llvm33 over 
Warning: Could not tap homebrew/homebrew-versions/llvm34 over 
Warning: Could not tap homebrew/homebrew-versions/llvm35 over 
Warning: Could not tap homebrew/homebrew-versions/log4cplus10 over 
Warning: Could not tap homebrew/homebrew-versions/lua52 over 
Warning: Could not tap homebrew/homebrew-versions/mapnik071 over 
Warning: Could not tap homebrew/homebrew-versions/maven2 over 
Warning: Could not tap homebrew/homebrew-versions/maven30 over 
Warning: Could not tap homebrew/homebrew-versions/maven31 over 
Warning: Could not tap homebrew/homebrew-versions/mongodb24 over 
Warning: Could not tap homebrew/homebrew-versions/mpfr2 over 
Warning: Could not tap homebrew/homebrew-versions/mysql51 over 
Warning: Could not tap homebrew/homebrew-versions/mysql55 over 
Warning: Could not tap homebrew/homebrew-versions/node04 over 
Warning: Could not tap homebrew/homebrew-versions/node06 over 
Warning: Could not tap homebrew/homebrew-versions/node08 over 
Warning: Could not tap homebrew/homebrew-versions/nu0 over 
Warning: Could not tap homebrew/homebrew-versions/open-mpi16 over 
Warning: Could not tap homebrew/homebrew-versions/openjpeg20 over 
Warning: Could not tap homebrew/homebrew-versions/openssl098 over 
Warning: Could not tap homebrew/homebrew-versions/percona-server55 over 
Warning: Could not tap homebrew/homebrew-versions/perl514 over 
Warning: Could not tap homebrew/homebrew-versions/perl516 over 
Warning: Could not tap homebrew/homebrew-versions/perl518 over 
Warning: Could not tap homebrew/homebrew-versions/phantomjs17 over 
Warning: Could not tap homebrew/homebrew-versions/phantomjs182 over 
Warning: Could not tap homebrew/homebrew-versions/phantomjs192 over 
Warning: Could not tap homebrew/homebrew-versions/play12 over 
Warning: Could not tap homebrew/homebrew-versions/plowshare3 over 
Warning: Could not tap homebrew/homebrew-versions/postgis15 over 
Warning: Could not tap homebrew/homebrew-versions/postgis20 over 
Warning: Could not tap homebrew/homebrew-versions/postgresql8 over 
Warning: Could not tap homebrew/homebrew-versions/postgresql9 over 
Warning: Could not tap homebrew/homebrew-versions/postgresql91 over 
Warning: Could not tap homebrew/homebrew-versions/postgresql92 over 
Warning: Could not tap homebrew/homebrew-versions/povray36 over 
Warning: Could not tap homebrew/homebrew-versions/ppl011 over 
Warning: Could not tap homebrew/homebrew-versions/ppl10 over 
Warning: Could not tap homebrew/homebrew-versions/protobuf240a over 
Warning: Could not tap homebrew/homebrew-versions/protobuf241 over 
Warning: Could not tap homebrew/homebrew-versions/rabbitmq30 over 
Warning: Could not tap homebrew/homebrew-versions/raptor1 over 
Warning: Could not tap homebrew/homebrew-versions/redis1310 over 
Warning: Could not tap homebrew/homebrew-versions/redis24 over 
Warning: Could not tap homebrew/homebrew-versions/ruby182 over 
Warning: Could not tap homebrew/homebrew-versions/ruby186 over 
Warning: Could not tap homebrew/homebrew-versions/ruby192 over 
Warning: Could not tap homebrew/homebrew-versions/ruby193 over 
Warning: Could not tap homebrew/homebrew-versions/ruby20 over 
Warning: Could not tap homebrew/homebrew-versions/scala210 over 
Warning: Could not tap homebrew/homebrew-versions/scala29 over 
Warning: Could not tap homebrew/homebrew-versions/solr14 over 
Warning: Could not tap homebrew/homebrew-versions/solr36 over 
Warning: Could not tap homebrew/homebrew-versions/squid2 over 
Warning: Could not tap homebrew/homebrew-versions/subversion16 over 
Warning: Could not tap homebrew/homebrew-versions/subversion17 over 
Warning: Could not tap homebrew/homebrew-versions/tomcat6 over 
Warning: Could not tap homebrew/homebrew-versions/unison232 over 
Warning: Could not tap homebrew/homebrew-versions/valgrind36 over 
Warning: Could not tap homebrew/homebrew-versions/valgrind38 over 
Warning: Could not tap homebrew/homebrew-versions/varnish3 over 
Warning: Could not tap homebrew/homebrew-versions/vtk5 over 
Warning: Could not tap homebrew/homebrew-versions/zeromq22 over 
Warning: Could not tap homebrew/homebrew-versions/zeromq3 over 
Warning: Could not tap homebrew/homebrew-versions/zeromq32 over 
Tapped 144 formulae

tapした後はちゃんとinfoで引けるようになった。
ただ、versionsとついているだけあって、最新版のはないけど。
$ brew info homebrew/versions/maven2
maven2: stable 2.2.1
http://maven.apache.org/
Not installed
From: https://github.com/homebrew/homebrew-versions/commits/master/maven2.rb
==> Caveats
WARNING: This older version will conflict with Maven if installed at the
same time.
 
$ brew info homebrew/versions/maven30
maven30: stable 3.0.5
http://maven.apache.org/
Not installed
From: https://github.com/homebrew/homebrew-versions/commits/master/maven30.rb
==> Caveats
WARNING: This older version will conflict with Maven if installed at the
same time.
 
$ brew info homebrew/versions/maven31
maven31: stable 3.1.1
http://maven.apache.org/
Not installed
From: https://github.com/homebrew/homebrew-versions/commits/master/maven31.rb
==> Caveats
WARNING: This older version will conflict with Maven if installed at the
same time.

そして最新版をインストール。あっさりと終わる。
$ brew install maven
==> Downloading http://www.apache.org/dyn/closer.cgi?path=maven/maven-3/3.2.1/binaries/apache-maven-3.2.1-bin.tar.gz
==> Best Mirror http://ftp.riken.jp/net/apache/maven/maven-3/3.2.1/binaries/apache-maven-3.2.1-bin.tar.gz
######################################################################## 100.0%
🍺  /usr/local/Cellar/maven/3.2.1: 65 files, 7.8M, built in 3 seconds

ちゃんとmavenが入っていることが確認できた。
インストールされてるディレクトリもわかるので助かる。
$ mvn -v
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-15T02:37:52+09:00)
Maven home: /usr/local/Cellar/maven/3.2.1/libexec
Java version: 1.6.0_65, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: ja_JP, platform encoding: SJIS
OS name: "mac os x", version: "10.9.3", arch: "x86_64", family: "mac"

2014年4月21日月曜日

Mac MavericksにPlay Frameworkをインストール

Mac MavericksにPlay Frameworkをインストールしました。

バージョン
Mac OS X 10.9.2
Play Framework2.2.2
Java 1.7.0_51
Eclipse 4.3

Macにはhomebrewでインストールできます。便利!
$ brew install play
==> Downloading http://downloads.typesafe.com/play/2.2.2/play-2.2.2.zip
######################################################################## 100.0%
🍺  /usr/local/Cellar/play/2.2.2: 2184 files, 130M, built in 37 seconds
インストールが完了したのでplayを起動
$ play
Getting com.typesafe.play console_2.10 2.2.2 ...
:: retrieving :: org.scala-sbt#boot-app
 confs: [default]
 6 artifacts copied, 0 already retrieved (2012kB/30ms)
Getting Scala 2.10.3 (for console)...
:: retrieving :: org.scala-sbt#boot-scala
 confs: [default]
 5 artifacts copied, 0 already retrieved (24447kB/145ms)
       _
 _ __ | | __ _ _  _
| '_ \| |/ _' | || |
|  __/|_|\____|\__ /
|_|            |__/
 
play 2.2.2 built with Scala 2.10.3 (running Java 1.7.0_51), http://www.playframework.com
 
This is not a play application!
 
Use `play new` to create a new Play application in the current directory,
or go to an existing application and launch the development console using `play`.
 
You can also browse the complete documentation at http://www.playframework.com.


無事に起動したので早速プロジェクトを作成
途中プロジェクト名聞かれるのでそのままEnterを押す
ScalaとJavaどちらにするか聞かれるので、今回はScalaで。
$ play new sample
       _
 _ __ | | __ _ _  _
| '_ \| |/ _' | || |
|  __/|_|\____|\__ /
|_|            |__/
 
play 2.2.2 built with Scala 2.10.3 (running Java 1.7.0_51), http://www.playframework.com
 
The new application will be created in /Users/xxxx/play/sample
 
What is the application name? [sample]
そのままEnter
 
Which template do you want to use for this new application? 
 
  1             - Create a simple Scala application
  2             - Create a simple Java application
 
> 1
OK, application sample is created.
 
Have fun!


プロジェクトを作成したので、とりあえず起動。
$ cd sample/
$ play run
Getting org.scala-sbt sbt 0.13.0 ...
:: retrieving :: org.scala-sbt#boot-app
 confs: [default]
 43 artifacts copied, 0 already retrieved (12440kB/196ms)
[info] Loading project definition from /Users/xxxx/play/sample/project
[info] Set current project to sample (in build file:/Users/xxxx/play/sample/)
[info] Updating {file:/Users/xxxx/play/sample/}sample...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
 
--- (Running the application from SBT, auto-reloading is enabled) ---
 
[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
 
(Server started, use Ctrl+D to stop and go back to the console...)
http://localhost:9000 にアクセスしてYour new application is readyのページが出ればOK
アクセスするとコンソールに以下がでる
[info] Compiling 5 Scala sources and 1 Java source to /Users/xxxx/play/sample/target/scala-2.10/classes...
[info] 'compiler-interface' not yet compiled for Scala 2.10.3. Compiling...
[info]   Compilation completed in 11.059 s
[info] play - Application started (Dev)
最初はdevモードで起動するので、起動しただけだとコンパイルはされずに、
初めてアクセスをしたタイミングでコンパイルが走る。

Ctrl+Dで停止すると以下が出て終了
[success] Total time: 155 s, completed 2014/04/15 12:10:15

次にEclipseで開発できるように以下を実行
$ play eclipse
[info] Loading project definition from /Users/xxxx/play/sample/project
[info] Set current project to sample (in build file:/Users/xxxx/play/sample/)
[info] About to create Eclipse project files for your project(s).
[info] Successfully created Eclipse project files for project(s):
[info] sample

Eclipse側の対応もやっていく。
eclipseにScala IDEをインストール
eclipseはeclipse-jee-kepler-SR2-macosx-cocoa-x86_64.tar.gzをダウンロードしてきて使用。
ソフトウエアを追加する。
Help → Install New Software
Addで以下を追加
Name:Scala IDE for Eclipse
Location:http://download.scala-ide.org/sdk/e38/scala210/dev/site/

Scala IDE for Eclipse
Scala IDE for Eclipse development support
Scala IDE for Eclipse Source Feature
Scala IDE plugins(incubation)
Sources
の5つが表示されるのですべてチェックしてNext

Will not be installedに以下が表示されていたけど、
InSynth Feature
keep my installation the same and modify the items being installed tobe compatible
を選択してNext。
もう一回Next。
Review Licensesの画面になるのでI accept〜を選択してFinish

Security Warningが出るけどOK
再起動するか聞かれるのでOK

再起動すると
Upgrade of Scala plugin detected.
Run setup diagnostics to ensure correct plugin settings?
と聞かれるのでYesとして、内容を確認してOKする

File-Import-General-Existing Projects into Workspace
Select root directory:に先ほど作ったplayのプロジェクトのディレクトリを指定してFinish
これでEclipseからPlayのプロジェクトを開発できます。

2014年4月16日水曜日

Mac MavericksにhomebrewでVirtualBoxをインストール

Macの環境を整えていくってことで、今回はVirtualBoxをhomebrewでインストール

まずはbrewで入れられるかsearchしてみる。
$ brew search virtualbox
No formula found for "virtualbox".
Searching pull requests...
Closed pull requests:
libvirt: Enabled Support for VirtualBox by Default, Removed QEMU (https://github.com/Homebrew/homebrew/pull/6821)
検索してもひっかからない。。

$ brew tap phinze/homebrew-cask
$ brew install brew-cask
「tap」コマンドはphinzeというアカウントのhomebrew-caskを追加するという意味らしい。

$ brew cask search virtualbox
==> Exact match
virtualbox
検索でvirtualboxがひっかかるようになった。
$ brew cask install virtualbox
==> Downloading http://download.virtualbox.org/virtualbox/4.3.10/VirtualBox-4.3.10-93012-OSX.dmg
######################################################################## 100.0%
==> Running installer for virtualbox; your password may be necessary.
Password:
==> installer: Package name is Oracle VM VirtualBox
==> installer: Installing at base path /
==> installer: The install was successful.
🍺  virtualbox installed to '/opt/homebrew-cask/Caskroom/virtualbox/4.3.10-93012' (4 files, 115M)
インストールを完了するとアプリケーションにVirtualBox.appが追加されます。
簡単に入れられてよいですね。

2014年4月15日火曜日

Mac Mavericksにhomebrewをインストール

せっかくのMacなのでパッケージ管理システムでいろいろ管理したいなということで、
homebrewを入れてみました。
1.Javaのインストール
jdk8をoracleのサイトからダウンロードしてインストール
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

$ java -version
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)

2.Xcodeのインストール
App Storeから入れられます。

3.homebrewのインストール
homebrewのサイト(http://brew.sh/index_ja.html)にある
インストール用のコマンドを実行する。

$ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
==> /usr/bin/sudo /usr/bin/xcode-select --install
xcode-select: note: install requested for command line developer tools
Press any key when the installation has completed.
ポップアップが出てcommand line toolsを入れるか聞かれるのでインストール

$ brew doctor
Your system is ready to brew.

$ brew update
とりあえずhomebrewの導入はこれで完了。