切换用户时出现了这个问题,append_path未找到,应该是在/etc/profile中的一个函数,但为什么会报错呢?
我发现/etc/下有一个profile.pacnew文件
查了一下,发现是更新系统的时候,由于我之前修改了/etc/profile文件,导致/etc/profile不能直接升级,就生成了一个/etc/profile.pacnew文件,然后让你手动修改
https://wiki.archlinux.org/index.php/Pacman/Pacnew_and_Pacsave
只需要合并/etc/profile和/etc/profile.pacnew文件即可
mv /etc/profile /etc/profile.old
mv /etc/profile.pacnew /etc/profile
然后在把之前修改的东西加到/etc/profile中去就可以了
修复成功了!