[Cygwin]setup.exeを使わずyum的なものでパッケージインストール
標題のようなツールがあるとか。z68デスクトップPCのCygwinで環境構築してみた。
Cygwinでコマンドラインからパッケージのインストールを行う
・まず、以下の必要パッケージをCygwinのsetup.exeでインストールと書いてあるが、
もともといずれもインストールされていたので、ここはスキップして次へ。
Devel/git-svn
Base/gawk
Utils/bzip2
Utils/tar → Base/tarの間違いでは??
Web/wget
・GoogleCodeからapt-cygを入手し、その後実行権限を付加する。これでインストール完了。
z68:~ --> svn --force export http://apt-cyg.googlecode.com/svn/trunk/ /bin/
A /bin
A /bin/apt-cyg
Exported revision 18.
z68:~ --> chmod +x /bin/apt-cyg
・デフォルトでは mirror.mcs.anl.gov を見に行く設定になってるという事なので、
日本のレポジトリに設定。
という事で上のホームページを参考にiijを追加したのだが、エラーになった。
z68:~ --> apt-cyg -m http://ftp.iij.ad.jp/pub/cygwin/ update
Working directory is /setup
Mirror is http://ftp.iij.ad.jp/pub/cygwin/
--2013-10-27 00:38:46-- http://ftp.iij.ad.jp/pub/cygwin//setup.bz2
Resolving ftp.iij.ad.jp (ftp.iij.ad.jp)... 202.232.140.144, 202.232.140.143
Connecting to ftp.iij.ad.jp (ftp.iij.ad.jp)|202.232.140.144|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2013-10-27 00:38:46 ERROR 404: Not Found.
--2013-10-27 00:38:46-- http://ftp.iij.ad.jp/pub/cygwin//setup.ini
Resolving ftp.iij.ad.jp (ftp.iij.ad.jp)... 202.232.140.144, 202.232.140.143
Connecting to ftp.iij.ad.jp (ftp.iij.ad.jp)|202.232.140.144|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2013-10-27 00:38:46 ERROR 404: Not Found.
Error updating setup.ini, reverting
・他のサイト見たら、httpでなくftpの記述になってたので実行してみた。
さっきとは違う結果のようだが、結局エラーになってるっぽい?
z68:~ --> apt-cyg -m http://ftp.iij.ad.jp/pub/cygwin/ update
Working directory is /setup
Mirror is http://ftp.iij.ad.jp/pub/cygwin/
--2013-10-27 00:38:46-- http://ftp.iij.ad.jp/pub/cygwin//setup.bz2
Resolving ftp.iij.ad.jp (ftp.iij.ad.jp)... 202.232.140.144, 202.232.140.143
Connecting to ftp.iij.ad.jp (ftp.iij.ad.jp)|202.232.140.144|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2013-10-27 00:38:46 ERROR 404: Not Found.
--2013-10-27 00:38:46-- http://ftp.iij.ad.jp/pub/cygwin//setup.ini
Resolving ftp.iij.ad.jp (ftp.iij.ad.jp)... 202.232.140.144, 202.232.140.143
Connecting to ftp.iij.ad.jp (ftp.iij.ad.jp)|202.232.140.144|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2013-10-27 00:38:46 ERROR 404: Not Found.
Error updating setup.ini, reverting
z68:~ --> apt-cyg -m ftp://ftp.iij.ad.jp/pub/cygwin/ update
Working directory is /setup
Mirror is ftp://ftp.iij.ad.jp/pub/cygwin/
--2013-10-27 00:40:54-- ftp://ftp.iij.ad.jp/pub/cygwin//setup.bz2
=> `.listing'
Resolving ftp.iij.ad.jp (ftp.iij.ad.jp)... 202.232.140.144, 202.232.140.143
Connecting to ftp.iij.ad.jp (ftp.iij.ad.jp)|202.232.140.144|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /pub/cygwin/ ... done.
==> PASV ... done. ==> LIST ... done.
[ <=> ] 444 --.-K/s in 0.03s
2013-10-27 00:40:54 (16.4 KB/s) - `.listing' saved [444]
Removed `.listing'.
--2013-10-27 00:40:54-- ftp://ftp.iij.ad.jp/pub/cygwin//setup.bz2
=> `setup.bz2'
==> CWD not required.
==> SIZE setup.bz2 ... done.
==> PASV ... done. ==> RETR setup.bz2 ...
No such file `setup.bz2'.
--2013-10-27 00:40:54-- ftp://ftp.iij.ad.jp/pub/cygwin//setup.ini
=> `.listing'
Resolving ftp.iij.ad.jp (ftp.iij.ad.jp)... 202.232.140.144, 202.232.140.143
Connecting to ftp.iij.ad.jp (ftp.iij.ad.jp)|202.232.140.144|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /pub/cygwin/ ... done.
==> PASV ... done. ==> LIST ... done.
[ <=> ] 444 --.-K/s in 0s
2013-10-27 00:40:54 (2.83 MB/s) - `.listing' saved [444]
Removed `.listing'.
--2013-10-27 00:40:54-- ftp://ftp.iij.ad.jp/pub/cygwin//setup.ini
=> `setup.ini'
==> CWD not required.
==> SIZE setup.ini ... done.
==> PASV ... done. ==> RETR setup.ini ...
No such file `setup.ini'.
Error updating setup.ini, reverting
・またまた違うサイトを見て今度は以下のjaistを指定したら成功した。
z68:~ --> apt-cyg -m ftp://ftp.jaist.ac.jp/pub/cygwin/x86_64/ update
Working directory is /setup
Mirror is ftp://ftp.jaist.ac.jp/pub/cygwin/x86_64/
--2013-10-27 00:46:52-- ftp://ftp.jaist.ac.jp/pub/cygwin/x86_64//setup.bz2
=> `.listing'
Resolving ftp.jaist.ac.jp (ftp.jaist.ac.jp)... 150.65.7.130
Connecting to ftp.jaist.ac.jp (ftp.jaist.ac.jp)|150.65.7.130|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /pub/cygwin/x86_64/ ... done.
==> PASV ... done. ==> LIST ... done.
[ <=> ] 460 --.-K/s in 0s
2013-10-27 00:46:52 (5.46 MB/s) - `.listing' saved [460]
Removed `.listing'.
--2013-10-27 00:46:52-- ftp://ftp.jaist.ac.jp/pub/cygwin/x86_64//setup.bz2
=> `setup.bz2'
==> CWD not required.
==> PASV ... done. ==> RETR setup.bz2 ... done.
Length: 296772 (290K)
100%[============================================================================================================>] 296,772 1.23M/s in 0.2s
2013-10-27 00:46:52 (1.23 MB/s) - `setup.bz2' saved [296772]
Updated setup.ini
・あとは欲しいパッケージをインストールするだけ。
tcshで実行してみたが、これでインストール出来るのは非常に楽。
apt-cyg update → まずはこれでレポジトリ更新するとの事。
apt-cyg → これをやると、apt-cygのhelpが出てくる。
apt-cyg find csh → cshという名前を含むパッケージを探す。
apt-cyg install tcsh → tcshパッケージのインストール。
(2014.3.8追記)
コメント頂いたのでapt-cygを再取得してみる。
・まずは現状のバージョンを確認してみた。
x230: apt-cyg --version
apt-cyg version 0.57
Written by Stephen Jungels
Copyright (c) 2005-9 Stephen Jungels. Released under the GPL.
・apt-cygのインストール方法はここに書いてある。
http://code.google.com/p/apt-cyg/
この末尾にこんな注意書きが。
If you find something that is not working or not compatible with a newer version of Cygwin, the easiest way to fix it is to fork the Github version: https://github.com/transcode-open/apt-cyg
上手くいかない場合はGithubバージョンを使えとか。
・Githubバージョンのページ見ると、0.59バージョンまでリリースされてる。
リンクURLはこれ。https://github.com/transcode-open/apt-cyg/blob/master/apt-cyg
・apt-cygページにあったQuick Startの方法でやってみる。
x230: svn --force export https://github.com/transcode-open/apt-cyg/blob/master/apt-cyg /bin/
svn: E170000: URL 'https://github.com/transcode-open/apt-cyg/blob/master/apt-cyg' は存在しません
あら、こうじゃなかったか。時間切れ。続く。