Cygwin 初期セットアップまとめ

Cygwinの初期セットアップについて、いつもの作業なのでメモ化しておく。

  1. Cygwin インストール(Windows XP 32bit スッキリ行かなかった版)
  2. Cygwin インストール(Windows 8 64bit スッキリ行った版)

Cygwin インストール(Winsows XP 32bit うまく行かなかった版)

wget インストール

git インストール

$ git config --global http.proxy *******:****

apt-cyg インストール

$ wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg
$ mv apt-cyg  /usr/bin
$ chmod +x /usr/bin/apt-cyg

apt-cyg の接続先変更

$ apt-cyg update -m http://ftp.jaist.ac.jp/pub/cygwin

apt-cyg 書き換え

$ diff /bin/apt-cyg_original /bin/apt-cyg
98c98,99
<     wget -N $mirror/setup.bz2
---
> #    wget -N $mirror/setup.bz2
>     wget -N $mirror/x86/setup.bz2
105c106,107
<       wget -N $mirror/setup.ini
---
> #      wget -N $mirror/setup.ini
>       wget -N $mirror/x86/setup.ini

zsh インストール

$ apt-cyg install zsh

vim インストール

  • 以下のエラーが出た
$ apt-cyg install gvim

...snip...

Installing xxd
Found package xxd
--2014-02-10 14:46:09--  http://ftp.jaist.ac.jp/pub/cygwin/x86/release/vim/xxd/x
xd-7.4.135-1.tar.xz
sciproxy (sciproxy) をDNSに問いあわせています... 192.168.16.11, 192.168.16.12
sciproxy (sciproxy)|192.168.16.11|:9080 に接続しています... 接続しました。
Proxy による接続要求を送信しました、応答を待っています... 200 OK
長さ: 55800 (54K) [application/x-tar]
`xxd-7.4.135-1.tar.xz' に保存中

100%[======================================>] 55,800      --.-K/s 時間 0.05s

2014-02-10 14:46:09 (1.05 MB/s) - `xxd-7.4.135-1.tar.xz' へ保存完了 [55800/55800
]

Unpacking...
bunzip2: (stdin) is not a bzip2 file.
tar: これは tar アーカイブではないようです
tar: 前のエラーにより失敗ステータスで終了します
  • ぐぐると、apt-cyg が対応しきれていないのが原因。github から適当なのを clone する。

apt-cyg インストール その2-1

$ git clone https://github.com/kou1okada/apt-cyg.git
  • 今度は /usr/lib/git-core/git-remote-https.exe で怒られる。激おこ。
  • 原因調査
$ cygcheck /usr/lib/git-core/git-remote-https.exe
C:\cygwin\lib\git-core\git-remote-https.exe
  C:\cygwin\bin\cygcrypto-0.9.8.dll
    C:\cygwin\bin\cygwin1.dll
      C:\WINDOWS\system32\KERNEL32.dll
        C:\WINDOWS\system32\ntdll.dll
    C:\cygwin\bin\cygz.dll
      C:\cygwin\bin\cyggcc_s-1.dll
  C:\cygwin\bin\cygcurl-4.dll
cygcheck: track_down: could not find cygcrypto-1.0.0.dll

    C:\cygwin\bin\cyggssapi-3.dll
      C:\cygwin\bin\cygheimntlm-0.dll
        C:\cygwin\bin\cygkrb5-26.dll
          C:\cygwin\bin\cygasn1-8.dll
            C:\cygwin\bin\cygroken-18.dll
              C:\cygwin\bin\cygcrypt-0.dll
            C:\cygwin\bin\cygcom_err-2.dll
          C:\cygwin\bin\cygwind-0.dll
          C:\cygwin\bin\cyghx509-5.dll
cygcheck: track_down: could not find cygcrypto-1.0.0.dll

cygcheck: track_down: could not find cygcrypto-1.0.0.dll

          C:\cygwin\bin\cygintl-8.dll
            C:\cygwin\bin\cygiconv-2.dll
          C:\cygwin\bin\cygsqlite3-0.dll
          C:\cygwin\bin\cygheimbase-1.dll
cygcheck: track_down: could not find cygcrypto-1.0.0.dll

cygcheck: track_down: could not find cygcrypto-1.0.0.dll

    C:\cygwin\bin\cygidn-11.dll
    C:\cygwin\bin\cyglber-2-4-2.dll
    C:\cygwin\bin\cygldap-2-4-2.dll
cygcheck: track_down: could not find cygcrypto-1.0.0.dll

      C:\cygwin\bin\cygsasl2-3.dll
cygcheck: track_down: could not find cygssl-1.0.0.dll

    C:\cygwin\bin\cygssh2-1.dll
cygcheck: track_down: could not find cygcrypto-1.0.0.dll

cygcheck: track_down: could not find cygssl-1.0.0.dll

libopenssl100 インストール

  • xz が絡んでくるので、setup.exeから。

apt-cyg インストール その2-2

  • ca-bundle.crt 入ってないぽい。
$ git clone https://github.com/kou1okada/apt-cyg.git
Cloning into 'apt-cyg'...
error: error setting certificate verify locations:
  CAfile: /usr/ssl/certs/ca-bundle.crt
  CApath: none while accessing https://github.com/kou1okada/apt-cyg.git/info/refs
fatal: HTTP request failed

 

  • …(無言でブラウザから apt-cygを落としてきて、Explorer から上書き)

 

$ git config --global http.sslVerify false
  • (無言)

vim インストール

$ apt-cyg install vim
  • Cygwingvim ちょっとめんどそうなので vim にした。.

 


 

  • 別PC(Windows8 64bit)でもセットアップしたんだが、こっちはすんなり入った・・・。年代物のXPだからかなぁ。多分もろもろが汚くなってる。

 


 

Cygwin インストール(Windows 8 64bit スッキリ行った版)

wget インストール

git インストール

ca-certificates おまじないインストール

GnuPG インストール

apt-cyg インストール

$ wget https://raw.github.com/kou1okada/apt-cyg/master/apt-cyg
$ chmod +x apt-cyg
$ mv apt-cyg  /usr/bin

apt-cyg の接続先変更

$ apt-cyg update -m http://ftp.jaist.ac.jp/pub/cygwin

zsh インストール

$ apt-cyg install zsh

vim インストール

$ apt-cyg install vim

参考・参照先:

Zsh - Windowsのターミナル環境を整える vol.1 - Qiita [キータ]

apt-cygでLinuxライクにパッケージをインストールしてみる - === SANDmark 19106 === beginning stress test

計算物理屋の研究備忘録 apt-cyg を64 bit 版でも使えるようにする

git - SSL certificate rejected trying to access GitHub over HTTPS behind firewall - Stack Overflow

apt-cyg - PIB - Seesaa Wiki(ウィキ)