老师,安装git 执行sudo make prefix=/usr/local all之后,出现这样的警告和错误是怎么回事呢?
来源:2-26 git版本控制工具安装与配置实操(linux系统同学看这节)
Calivo
2017-06-04
执行之后有这样的提示
以下是我执行sudo make prefix=/usr/local all 记录的日志
#############################################
[root@hui-Linux ~]# cd git-2.8.0
[root@hui-Linux git-2.8.0]# sudo make prefix=/usr/local all
GIT_VERSION = 2.8.0
* new build flags
CC credential-store.o
* new link flags
CC abspath.o
CC advice.o
CC alias.o
CC alloc.o
CC archive.o
CC archive-tar.o
CC archive-zip.o
CC argv-array.o
* new prefix flags
CC attr.o
CC base85.o
CC bisect.o
CC blob.o
CC branch.o
CC bulk-checkin.o
CC bundle.o
CC cache-tree.o
CC color.o
color.c: 在函数‘color_parse_mem’中:
color.c:203: 警告:此函数中的‘c.value’在使用前可能未初始化
color.c:203: 警告:此函数中的‘c.blue’在使用前可能未初始化
color.c:203: 警告:此函数中的‘c.green’在使用前可能未初始化
color.c:203: 警告:此函数中的‘c.red’在使用前可能未初始化
CC column.o
CC combine-diff.o
CC commit.o
CC compat/obstack.o
CC compat/terminal.o
CC config.o
config.c: 在函数‘git_config_set_multivar_in_file_gently’中:
config.c:2000: 警告:此函数中的‘contents_sz’在使用前可能未初始化
CC connect.o
CC connected.o
CC convert.o
CC copy.o
CC credential.o
CC csum-file.o
CC ctype.o
CC date.o
CC decorate.o
CC diffcore-break.o
CC diffcore-delta.o
CC diffcore-order.o
CC diffcore-pickaxe.o
CC diffcore-rename.o
CC diff-delta.o
CC diff-lib.o
CC diff-no-index.o
CC diff.o
CC dir.o
CC editor.o
CC entry.o
CC environment.o
CC ewah/bitmap.o
CC ewah/ewah_bitmap.o
CC ewah/ewah_io.o
CC ewah/ewah_rlw.o
CC exec_cmd.o
CC fetch-pack.o
CC fsck.o
CC gettext.o
CC gpg-interface.o
CC graph.o
CC grep.o
CC hashmap.o
GEN common-cmds.h
CC help.o
CC hex.o
CC ident.o
CC kwset.o
CC levenshtein.o
CC line-log.o
CC line-range.o
CC list-objects.o
CC ll-merge.o
CC lockfile.o
CC log-tree.o
CC mailinfo.o
CC mailmap.o
CC match-trees.o
CC merge.o
CC merge-blobs.o
CC merge-recursive.o
CC mergesort.o
CC name-hash.o
CC notes.o
CC notes-cache.o
CC notes-merge.o
CC notes-utils.o
CC object.o
CC pack-bitmap.o
CC pack-bitmap-write.o
CC pack-check.o
CC pack-objects.o
CC pack-revindex.o
CC pack-write.o
CC pager.o
CC parse-options.o
CC parse-options-cb.o
CC patch-delta.o
CC patch-ids.o
CC path.o
CC pathspec.o
CC pkt-line.o
CC preload-index.o
CC pretty.o
CC prio-queue.o
CC progress.o
CC prompt.o
CC quote.o
CC reachable.o
CC read-cache.o
CC reflog-walk.o
CC refs.o
CC refs/files-backend.o
CC ref-filter.o
CC remote.o
CC replace_object.o
CC rerere.o
CC resolve-undo.o
CC revision.o
CC run-command.o
CC send-pack.o
CC sequencer.o
CC server-info.o
CC setup.o
CC sha1-array.o
CC sha1-lookup.o
CC sha1_file.o
CC sha1_name.o
CC shallow.o
CC sideband.o
CC sigchain.o
CC split-index.o
CC strbuf.o
CC streaming.o
CC string-list.o
CC submodule.o
CC submodule-config.o
CC symlinks.o
CC tag.o
CC tempfile.o
CC trace.o
CC trailer.o
CC transport.o
CC transport-helper.o
CC tree-diff.o
CC tree.o
CC tree-walk.o
CC unpack-trees.o
CC url.o
CC urlmatch.o
CC usage.o
CC userdiff.o
CC utf8.o
CC varint.o
CC version.o
CC versioncmp.o
CC walker.o
CC wildmatch.o
CC worktree.o
CC wrapper.o
CC write_or_die.o
CC ws.o
CC wt-status.o
CC xdiff-interface.o
CC zlib.o
CC unix-socket.o
CC thread-utils.o
CC compat/strlcpy.o
AR libgit.a
CC xdiff/xdiffi.o
CC xdiff/xprepare.o
CC xdiff/xutils.o
CC xdiff/xemit.o
CC xdiff/xmerge.o
CC xdiff/xpatience.o
CC xdiff/xhistogram.o
AR xdiff/lib.a
LINK git-credential-store
CC daemon.o
LINK git-daemon
CC fast-import.o
LINK git-fast-import
CC http-backend.o
LINK git-http-backend
CC imap-send.o
LINK git-imap-send
CC sh-i18n--envsubst.o
LINK git-sh-i18n--envsubst
CC shell.o
LINK git-shell
CC show-index.o
LINK git-show-index
CC upload-pack.o
LINK git-upload-pack
CC remote-testsvn.o
CC vcs-svn/line_buffer.o
CC vcs-svn/sliding_window.o
CC vcs-svn/repo_tree.o
CC vcs-svn/fast_export.o
CC vcs-svn/svndiff.o
CC vcs-svn/svndump.o
AR vcs-svn/lib.a
LINK git-remote-testsvn
CC http.o
CC http-walker.o
CC http-fetch.o
LINK git-http-fetch
CC http-push.o
http-push.c:18:19: 警告:expat.h:没有那个文件或目录
http-push.c:831: 警告:在‘XML_Char’的声明中,类型默认为‘int’
http-push.c:831: 错误:expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
http-push.c: 在函数‘lock_remote’中:
http-push.c:901: 错误:‘XML_Parser’未声明(在此函数内第一次使用)
http-push.c:901: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
http-push.c:901: 错误:所在的函数内也只报告一次。)
http-push.c:901: 错误:expected ‘;’ before ‘parser’
http-push.c:908: 警告:隐式声明函数‘XML_SetUserData’
http-push.c:908: 错误:‘parser’未声明(在此函数内第一次使用)
http-push.c:909: 警告:隐式声明函数‘XML_SetElementHandler’
http-push.c:911: 警告:隐式声明函数‘XML_SetCharacterDataHandler’
http-push.c:911: 错误:‘xml_cdata’未声明(在此函数内第一次使用)
http-push.c:912: 警告:隐式声明函数‘XML_Parse’
http-push.c:917: 警告:隐式声明函数‘XML_ErrorString’
http-push.c:918: 警告:隐式声明函数‘XML_GetErrorCode’
http-push.c:921: 警告:隐式声明函数‘XML_ParserFree’
http-push.c: 在函数‘remote_ls’中:
http-push.c:1155: 错误:‘XML_Parser’未声明(在此函数内第一次使用)
http-push.c:1155: 错误:expected ‘;’ before ‘parser’
http-push.c:1162: 错误:‘parser’未声明(在此函数内第一次使用)
http-push.c:1165: 错误:‘xml_cdata’未声明(在此函数内第一次使用)
http-push.c: 在函数‘locking_available’中:
http-push.c:1229: 错误:‘XML_Parser’未声明(在此函数内第一次使用)
http-push.c:1229: 错误:expected ‘;’ before ‘parser’
http-push.c:1236: 错误:‘parser’未声明(在此函数内第一次使用)
make: *** [http-push.o] 错误 1
[root@hui-Linux git-2.8.0]# make prefix=/usr/local all
CC http-push.o
http-push.c:18:19: 警告:expat.h:没有那个文件或目录
http-push.c:831: 警告:在‘XML_Char’的声明中,类型默认为‘int’
http-push.c:831: 错误:expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
http-push.c: 在函数‘lock_remote’中:
http-push.c:901: 错误:‘XML_Parser’未声明(在此函数内第一次使用)
http-push.c:901: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
http-push.c:901: 错误:所在的函数内也只报告一次。)
http-push.c:901: 错误:expected ‘;’ before ‘parser’
http-push.c:908: 警告:隐式声明函数‘XML_SetUserData’
http-push.c:908: 错误:‘parser’未声明(在此函数内第一次使用)
http-push.c:909: 警告:隐式声明函数‘XML_SetElementHandler’
http-push.c:911: 警告:隐式声明函数‘XML_SetCharacterDataHandler’
http-push.c:911: 错误:‘xml_cdata’未声明(在此函数内第一次使用)
http-push.c:912: 警告:隐式声明函数‘XML_Parse’
http-push.c:917: 警告:隐式声明函数‘XML_ErrorString’
http-push.c:918: 警告:隐式声明函数‘XML_GetErrorCode’
http-push.c:921: 警告:隐式声明函数‘XML_ParserFree’
http-push.c: 在函数‘remote_ls’中:
http-push.c:1155: 错误:‘XML_Parser’未声明(在此函数内第一次使用)
http-push.c:1155: 错误:expected ‘;’ before ‘parser’
http-push.c:1162: 错误:‘parser’未声明(在此函数内第一次使用)
http-push.c:1165: 错误:‘xml_cdata’未声明(在此函数内第一次使用)
http-push.c: 在函数‘locking_available’中:
http-push.c:1229: 错误:‘XML_Parser’未声明(在此函数内第一次使用)
http-push.c:1229: 错误:expected ‘;’ before ‘parser’
http-push.c:1236: 错误:‘parser’未声明(在此函数内第一次使用)
make: *** [http-push.o] 错误 1
[root@hui-Linux git-2.8.0]# sudo make prefix=/usr/local all
CC http-push.o
http-push.c:18:19: 警告:expat.h:没有那个文件或目录
http-push.c:831: 警告:在‘XML_Char’的声明中,类型默认为‘int’
http-push.c:831: 错误:expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
http-push.c: 在函数‘lock_remote’中:
http-push.c:901: 错误:‘XML_Parser’未声明(在此函数内第一次使用)
http-push.c:901: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
http-push.c:901: 错误:所在的函数内也只报告一次。)
http-push.c:901: 错误:expected ‘;’ before ‘parser’
http-push.c:908: 警告:隐式声明函数‘XML_SetUserData’
http-push.c:908: 错误:‘parser’未声明(在此函数内第一次使用)
http-push.c:909: 警告:隐式声明函数‘XML_SetElementHandler’
http-push.c:911: 警告:隐式声明函数‘XML_SetCharacterDataHandler’
http-push.c:911: 错误:‘xml_cdata’未声明(在此函数内第一次使用)
http-push.c:912: 警告:隐式声明函数‘XML_Parse’
http-push.c:917: 警告:隐式声明函数‘XML_ErrorString’
http-push.c:918: 警告:隐式声明函数‘XML_GetErrorCode’
http-push.c:921: 警告:隐式声明函数‘XML_ParserFree’
http-push.c: 在函数‘remote_ls’中:
http-push.c:1155: 错误:‘XML_Parser’未声明(在此函数内第一次使用)
http-push.c:1155: 错误:expected ‘;’ before ‘parser’
http-push.c:1162: 错误:‘parser’未声明(在此函数内第一次使用)
http-push.c:1165: 错误:‘xml_cdata’未声明(在此函数内第一次使用)
http-push.c: 在函数‘locking_available’中:
http-push.c:1229: 错误:‘XML_Parser’未声明(在此函数内第一次使用)
http-push.c:1229: 错误:expected ‘;’ before ‘parser’
http-push.c:1236: 错误:‘parser’未声明(在此函数内第一次使用)
make: *** [http-push.o] 错误 1
#############################################
麻烦老师解答一下。谢谢
1回答
-
Geely
2017-06-04
hi 同学,这个如果使用root账号,就不需要sudo啦,另外看看视频当中有这个报错么?然后尝试一下命令是否正常,实在不行,可以卸载一下,建议git的编译安装完全按照视频当中来做,不要自己改路径。加油加油。
00
相似问题