2015年10月15日木曜日

Cygwin でパス指定時に No such file or directory

Cygwin 上で突如パス指定が No such file or directory とエラーが出て嵌った・・・

ホームディレクトリから指定した場合
ls ~/.bash_profile
/bin/ls: /cygdrive/d/home/.bash_profile: No such file or directory
絶対パス
ls /cygdrive/d/.bash_profile
/bin/ls: /cygdrive/d/home/.bash_profile: No such file or directory
カレントディレクトリ
ls ./.bash_profile
./.bash_profile
どうやら相対パスの場合見えるようだ

次に cygdrive を見てみると
ls /cygdrive/
/bin/ls: /cygdrive/: No such file or directory
そもそもこれがみえない・・・
今朝方、Windows Update と Norton のインストールを行ったためアンインストールしてみる。
が、変わらない・・・
その他、/usr 以下に作っていたディレクトリも見えなくなっている・・・
そこで / から追ってみようと ls を叩いてみると
ls /
Git Bash.vbs
README.portable
ReleaseNotes.rtf
bin
cmd
doc
etc
git-bash.bat
git-cheetah
git-cmd.bat
lib
libexec
share
ssl
ん? /usr /var 等が見当たらない。
そして git の文字が・・・
そういえば、最近 MSysGit に PATH を通した記憶が。
エクスプローラで MSysGit のディレクトリを見てみると同じフォルダ構成になっている。
PATH を消してみるとなおった

どうやら PATH を .bash_profile に設定した後、再読み込みも再起動もしていなかったらしい・・・
MSysGit にある bin の以下にコマンドがありこちらを使用していた模様。

0 件のコメント:

コメントを投稿