可执行路径指向错误的位置,我该如何更新 [英] exectuable path pointing to the wrong location, how do I update

查看:103
本文介绍了可执行路径指向错误的位置,我该如何更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近使用npm更新了一个nodejs可执行文件,现在该可执行文件指向了错误的位置.当我在终端中运行which命令时,它指向的是旧的不存在的位置.如何更新可执行文件路径或快捷方式.我不是Unix使用者,所以不确定在哪里设置.

I recently updated a nodejs executable using npm and now the executable is pointing to the wrong location. when I run the which command in terminal it is pointing to the old non-existant location. How do I update the executable path or shortcut. I'm not a unix person so not sure where that is set.

我不必一定要更新环境中所有应用程序的路径,只是想知道为什么旧可执行文件的路径仍在周围并指向错误的位置.

I don't necessarily need to update the path for all my apps in the environment, just curious to know why that path for the old executable is still hanging around and pointing to the wrong location.

推荐答案

bash缓存了您运行的可执行文件的路径.您可以使用"hash -r"重置缓存(或启动新的bash会话或终端).

bash caches the paths to executables you've run. You can reset the cache with "hash -r" (or start a new bash session or terminal).

这篇关于可执行路径指向错误的位置,我该如何更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆