升级到 12.04 后,我尝试设置 gitslave。这在 11.10 上使用 gitslave 2.0.1 版本有效(仅供参考:我在 12.04 上测试了 2.0.1...结果相同)。
$ tar xvzf gitslave-2.0.2.tar.gz
gitslave-2.0.2/
gitslave-2.0.2/web/
gitslave-2.0.2/web/index.html
gitslave-2.0.2/web/Makefile
gitslave-2.0.2/web/ReleaseNotes.txt
gitslave-2.0.2/web/tutorial.css
gitslave-2.0.2/web/tutorial-basic.html
gitslave-2.0.2/prep_gitscheck
gitslave-2.0.2/gits
gitslave-2.0.2/Makefile
gitslave-2.0.2/ReleaseNotes
gitslave-2.0.2/README
gitslave-2.0.2/contrib/
gitslave-2.0.2/contrib/gitslave.spec.in
gitslave-2.0.2/contrib/Makefile
gitslave-2.0.2/contrib/gitslave.spec
gitslave-2.0.2/contrib/.gitignore
gitslave-2.0.2/contrib/gitin
gitslave-2.0.2/contrib/gits-checkup
gitslave-2.0.2/.gitignore
gitslave-2.0.2/BugsTodo
gitslave-2.0.2/LICENSE.README
gitslave-2.0.2/LICENSE.TXT
$ cd gitslave-2.0.2
$ make
make -C web
make[1]: Entering directory `/home/tim/Desktop/gitslave-2.0.2/web'
make[1]: `gits-man-page.html' is up to date.
make[1]: Leaving directory `/home/tim/Desktop/gitslave-2.0.2/web'
make -C contrib
make[1]: Entering directory `/home/tim/Desktop/gitslave-2.0.2/contrib'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/tim/Desktop/gitslave-2.0.2/contrib'
$ sudo make install -C contrib
make: Entering directory `/home/tim/Desktop/gitslave-2.0.2/contrib'
mkdir -p //usr/local/share/man/man1 //usr/local/bin
install -m 444 gits-checkup.1 //usr/local/share/man/man1
install -m 444 gitin.1 //usr/local/share/man/man1
install -m 444 gitin.1 //usr/local/share/man/man1/gitout.1
install -m 755 gits-checkup //usr/local/bin
install -m 755 gitin //usr/local/bin/
install -m 755 gitin //usr/local/bin/gitout
make: Leaving directory `/home/tim/Desktop/gitslave-2.0.2/contrib'
$ gits
No command 'gits' found, did you mean:
Command 'gitps' from package 'gnuit' (universe)
Command 'giws' from package 'giws' (universe)
Command 'gitg' from package 'gitg' (universe)
Command 'gitk' from package 'gitk' (main)
Command 'gist' from package 'yorick' (universe)
Command 'git' from package 'git' (main)
gits: command not found
我究竟做错了什么?
更新:
gits 文件似乎没有安装到正确的目录中
$ sudo find / -name 'gits'
/home/tim/Desktop/gitslave-2.0.2/gits
~/Desktop/gitslave-2.0.2$ ./gits
Usage: gits [-p|--parallel COUNT] [-v|--verbose]+ [--quiet] [--rawout] [--help] [--version]
[-n|--no-pager] [--paginate] [--eval-args] [--exclude SLAVE-REGEXP]
[--keep-going] [--no-commit] [--no-hide] [--no-progress]
更新
尴尬又恼火……只需要重启一下。睡了一晚后,今天早上它突然就好了。
echo $PATH; ls -l /usr/local/bin
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
total 132
-rwxr-xr-x 1 root root 2914 Jun 18 15:58 gitin
-rwxr-xr-x 1 root root 2914 Jun 18 15:58 gitout
-rwxr-xr-x 1 root root 120109 Jun 18 15:59 gits
-rwxr-xr-x 1 root root 3331 Jun 18 15:58 gits-checkup
每次将某些东西安装到 /usr/local/bin 时,我是否都必须重新启动?(仅供参考:今天早上在使用 node-less 时也遇到了同样的问题...需要再次重新启动才能正常工作)
答案1
您似乎没有运行过,sudo make install
或者如果您运行过但您没有粘贴上面的输出。
如果您认为您已经这样做了,请使用该粘贴更新您的问题,并包括以下输出echo $PATH; ls -l /usr/local/bin
如果您没有这样做,是什么文档失败导致您尝试这样做-C contrib
?
谢谢