您尚未登录。

#1 2023-01-19 12:14:52

Bryan2333
会员
注册时间: 2023-01-19
帖子: 95

[已解决] zsh下执行append_path 提示 command not found

今天安装openjdk的时候,提示到 you need to re-login or source /etc/profile.d/jre.sh 于是在 pacman 安装完后,就执行了一下  source /etc/profile.d/jre.sh , 结果提示
/etc/profile.d/jre.sh:3: command not found: append_path

我在网上查找了一下,通常是因为 profile.pacnew 导致的,但是我也没有修改过 /etc/profile 文件

求解决方法

最近编辑记录 Bryan2333 (2023-01-19 13:16:28)

离线

#2 2023-01-19 12:45:00

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,384
个人网站

Re: [已解决] zsh下执行append_path 提示 command not found

因为你自己 source 确实是没有这个函数的,profile 执行完 profile.d 之后就删掉了。你需要重新登录。

离线

#3 2023-01-19 12:50:27

Bryan2333
会员
注册时间: 2023-01-19
帖子: 95

Re: [已解决] zsh下执行append_path 提示 command not found

我没有重新登陆,直接重启了。再去 source , 也是提示 command not found.

我之前安装 openjdk 的时候,也是安装完就直接 source , 但没有像这次一样报错

最近编辑记录 Bryan2333 (2023-01-19 12:51:01)

离线

#4 2023-01-19 13:03:11

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,384
个人网站

Re: [已解决] zsh下执行append_path 提示 command not found

不要自己去 source 了啦。

离线

#5 2023-01-19 13:16:05

Bryan2333
会员
注册时间: 2023-01-19
帖子: 95

Re: [已解决] zsh下执行append_path 提示 command not found

好的,了解

离线

页脚