shell init issue when click tab, what's wrong with getcwd?

前端 未结 4 1162
死守一世寂寞
死守一世寂寞 2021-01-30 09:53

once i click Tab on bash, the error message will appear, what\'s wrong?

symlink-hook: error retrieving current directory: getcwd: cannot access parent directorie         


        
4条回答
  •  北荒
    北荒 (楼主)
    2021-01-30 10:40

    By chance, is this occurring on a directory using OverlayFS (or some other special file system type)?

    I just had this issue where my cross-compiled version of bash would use an internal implementation of getcwd which has issues with OverlayFS. I found information about this here:

    It seems that this can be traced to an internal implementation of getcwd() in bash. When cross-compiled, it can't check for getcwd() use of malloc, so it is cautious and sets GETCWD_BROKEN and uses an internal implementation of getcwd(). This internal implementation doesn't seem to work well with OverlayFS.

    http://permalink.gmane.org/gmane.linux.embedded.yocto.general/25204

    You can configure and rebuild bash with bash_cv_getcwd_malloc=yes (if you're actually building bash and your C library does malloc a getcwd call).

提交回复
热议问题