2011-12-20 77 views
2

我想在我的主目录下的unix服务器上安装git,我有一个shell帐户作为用户,但没有root权限。我下面的说明在这些来源:Git以用户身份安装在主目录中:错误?

How to install Git on a shared host

git/scm book

和安装的Git源目录中的文件指示,但继续得到大多此错误消息的重复无尽的名单:

make: "~/haziz/opt/bin/src/git/Makefile" line 1510: Need an operator 
make: "~/haziz/opt/bin/src/git/Makefile" line 1511: warning: duplicate script for target "ifdef" ignored 
make: "~/haziz/opt/bin/src/git/Makefile" line 278: warning: using previous script for "ifdef" defined here 
make: "~/haziz/opt/bin/src/git/Makefile" line 1512: warning: duplicate script for target "ifdef" ignored 
make: "~/haziz/opt/bin/src/git/Makefile" line 278: warning: using previous script for "ifdef" defined here 
make: "~/haziz/opt/bin/src/git/Makefile" line 1513: Need an operator 
make: "~/haziz/opt/bin/src/git/Makefile" line 1514: Need an operator 

只是为了说明这是在我的主目录中,而不是在没有root权限的系统上。

任何想法或建议吗?我究竟做错了什么?

编辑:尝试按照Greg Hewgill的建议将命令作为gmake运行。

现在的错误消息:

/usr/pkg/include/pthread.h:285: error: conflicting types for 'pthread_t' 
/usr/include/pthread_types.h:65: error: previous declaration of 'pthread_t' was here 
/usr/pkg/include/pthread.h:286: error: conflicting types for 'pthread_attr_t' 
/usr/include/pthread_types.h:66: error: previous declaration of 'pthread_attr_t' was here 
/usr/pkg/include/pthread.h:288: error: conflicting types for 'pthread_once_t' 
/usr/include/pthread_types.h:71: error: previous declaration of 'pthread_once_t' was here 
/usr/pkg/include/pthread.h:289: error: conflicting types for 'pthread_mutexattr_t' 
/usr/include/pthread_types.h:68: error: previous declaration of 'pthread_mutexattr_t' was here 
/usr/pkg/include/pthread.h:290: error: conflicting types for 'pthread_mutex_t' 
/usr/include/pthread_types.h:67: error: previous declaration of 'pthread_mutex_t' was here 
/usr/pkg/include/pthread.h:291: error: conflicting types for 'pthread_condattr_t' 
/usr/include/pthread_types.h:70: error: previous declaration of 'pthread_condattr_t' was here 
/usr/pkg/include/pthread.h:292: error: conflicting types for 'pthread_cond_t' 
/usr/include/pthread_types.h:69: error: previous declaration of 'pthread_cond_t' was here 
/usr/pkg/include/pthread.h:293: error: conflicting types for 'pthread_rwlockattr_t' 
/usr/include/pthread_types.h:74: error: previous declaration of 'pthread_rwlockattr_t' was here 
/usr/pkg/include/pthread.h:294: error: conflicting types for 'pthread_rwlock_t' 
/usr/include/pthread_types.h:73: error: previous declaration of 'pthread_rwlock_t' was here 
/usr/pkg/include/pthread.h:357: error: conflicting types for 'pthread_kill' 
/usr/include/signal.h:69: error: previous declaration of 'pthread_kill' was here 
+0

您正在使用的命令行是什么?它是'make && make install'?我问的原因是,我很惊讶地看到这些错误消息中的“〜”和你的完整路径。 – 2011-12-20 01:48:58

+0

我的确编辑了一些信息,部分是为了简洁。它实际上提供了完整的路径,密码风格。 – haziz 2011-12-20 01:56:43

回答

1

通常这种类型的错误是使用了错误的make引起的。您可能使用BSD风格make,而Git需要GNU风格make。在你的系统上,GNU风格的make可能已经被安装为gmake,否则你将不得不去寻找并构建其中的一个。

+0

其实我指的服务器实际上是在运行netbsd。有什么建议么? – haziz 2011-12-20 01:56:55

+1

(1)尝试'gmake'。 (2)如果这不起作用,请获取[GNU make](https://www.gnu.org/s/make/)并首先构建它。 – 2011-12-20 02:00:09