eshell 中使用cmake报错

在eshell 中运行报错

~/work/adata $ sh auto_build.sh 
Already up-to-date.
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/usr/share/cmake
CMake Error: Error executing cmake::LoadCache(). Aborting.

在mac终端下运行正常 请问是什么问题?

感觉eshell 和 shell 的路径不一样 该如何修改

打算用eshell 完全的替代shell

!!! 用which cmake 看了一下

eshell中用的是 /usr/bin/cmake shell中是 /usr/local/bin/cmake

那么问题来了 怎么改呢。。。

分享一下解决过程:

  • 用 which 命令看一下 调用路径
eshell :   /usr/bin/cmake
shell  :   /usr/local/bin/cmake
  • 给环境变量增加路径 放最前面 貌似是按照先后顺序搜索
(setenv "PATH" (concat "/usr/local/bin;" (getenv "PATH")))

其他如果什么找不到 执行效果不一致 应该都是这种问题 !!

GitHub - purcell/exec-path-from-shell: Make Emacs use the $PATH set up by the user's shell 这个方案一劳永逸的解决问题.

BTW, 可以用我的 GitHub - manateelazycat/aweshell: Awesome shell extension base on eshell with wonderful features!

自动修复这种问题, 还给你太多方便的功能.

好的 我先看一下 不懂的在请教 感谢

看了一下 解决了问题! 膜拜大神! aweshell 也很cool 怎么melpa上没有

不放 melpa 的原因: 我为什么不想把自己的Emacs插件放到MELPA上? - 简书