5
5

More than 5 years have passed since last update.

FreeBSDでgitインストール

Posted at

結構ハマったのでメモ.

install方法

公式サイトによれば,FreeBSDでのインストールは
# cd /usr/ports/devel/git
# make install
でいいらしい.
http://git-scm.com/download/linux

というわけで,makeコマンド打ったら表示されるconfig用windowに適当にチェック入れてインストール開始
スクリーンショット 2015-03-11 18.07.05.png

と思ったらcurlのinstallでコケる.(エラーメッセージはコピーしてなかったので適当に拾ってきたものです)

===>  License MIT accepted by the user
===>  Found saved configuration for curl-7.24.0_3
===> Fetching all distfiles required by curl-7.24.0_3 for building
===>  Extracting for curl-7.24.0_3
=> SHA256 Checksum OK for curl-7.24.0.tar.lzma.
===>   curl-7.24.0_3 depends on file: /usr/local/bin/perl5.12.4 - found
tar: Unrecognized archive format
tar: Error exit delayed from previous errors.
*** Error code 1

Stop in /usr/ports/ftp/curl.
*** Error code 1

どうやらtarがlzmaって形式に対応してないので入れなおさないといけないらしい.

最新(?)のTarのインストール

デフォルトで入っているtarが2系だったので入れなおし.
例のごとくディレクトリ移動して make install

# cd /usr/ports/archivers/libarchive
# make install clean

既存のtarコマンドを置き換え(installしたbsdtarにリンクを貼り直し)て,
versionの確認.3系になってればlzma形式の解凍ができるっぽい.

# ln -sf /usr/local/bin/bsdtar /usr/bin/tar
# tar --version
bsdtar 3.1.2 - libarchive 3.1.2

参考サイト
https://forums.freebsd.org/threads/curl-unrecognized-archive-format.39917/

ありがとうSadokさん.

gitインストール続き

もう一回gitディレクトリに移動してinstallをやり直し.

# cd /usr/ports/devel/git
# make install

順調と思いきや,古いsvnが既にinstallされていたためエラー発生.
# pkg-delete コマンドで消せるらしい(とエラーメッセージに書いてた)けど,上手くuninstallが出来きなかったので
# make config で設定画面をもう一度出してsvnのチェックを外してもっかいやり直し.

スクリーンショット 2015-03-11 18.05.45.png

もう一度# make installすると無事gitコマンドがinstall出来ました.

5
5
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5