Git 以用户身份安装在主目录中:错误?

发布于 2024-12-22 04:06:03 字数 2860 浏览 1 评论 0原文

我正在尝试在 unix 服务器上的主目录中安装 git,我有一个 shell 帐户作为用户,但没有 root 权限。我按照这些来源中的说明进行操作:

如何在共享主机上安装 Git

git/scm book

和 INSTALL 文件说明在 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

I am trying to install git within my home directory on a unix server where I have a shell account as a user but do not have root privileges. I am following the instructions in on these sources:

How to install Git on a shared host

git/scm book

and the INSTALL file instructions within the git source directory but keep getting an endless list of mostly repeats of this error message:

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

Just to clarify this is within my home directory not on the system where I do not have root privileges.

Any ideas or suggestions? What am I doing wrong?

Edit: Tried running the command as gmake per Greg Hewgill's suggestion.

now the error messages are:

/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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

硬不硬你别怂 2024-12-29 04:06:03

通常这种类型的错误是由于使用了错误的 make 造成的。您可能使用的是 BSD 风格的 make,而 Git 需要 GNU 风格的 make。 GNU 风格的 make 可能已经作为 gmake 安装在您的系统上,否则您还必须寻找并构建其中一个。

Usually this type of error is caused by using the wrong make. You're probably using a BSD-style make, while Git requires a GNU-style make. A GNU-style make may already be installed as gmake on your system, otherwise you'll have to go find and build one of those, too.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文