报错信息
报错信息如下:
$ git submodule add https://github.com/libevent/libevent deps/libevent
'deps/libevent' already exists in the index
该错误是在执行:https://github.com/oceanbase/miniob/blob/main/docs/how_to_build.md 页面的步骤 3、4、5 时出现的
解决方法
今天在 build 这几个依赖时,报了上面的错误:‘xxxxx’ already exists in the index。
其实就是因为有相同名字的模块已经存在于 git 的索引中。我们只需要执行如下操作,把这些删除掉重新再添加即可:
git rm -r --cached deps/libevent
git rm -r --cached deps/googletest
git rm -r --cached deps/jsoncpp
重新添加: