[3rd-Party Apps] 管理员帐号安装了git,非管理员帐号没有git信息,并指令失效 Resolved
Tofloor
poster avatar
wang3develop
deepin
2022-12-29 04:11
Author

管理员帐号

执行了指令

sudo apt-get install git

检查

git --version

获得了git的版本号。

非管理员帐号

好像没法执行bash指令了

截图_选择区域_20221228200545.png

Reply Favorite View the author
All Replies
thepoy
deepin
2022-12-29 04:21
#1

执行:

export PATH /usr/bin

后再执行 ls试试行不。

Reply View the author
wang3develop
deepin
2022-12-29 04:39
#2
thepoy

执行:

export PATH /usr/bin

后再执行 ls试试行不。

失败。

source /etc/profile

vi ~/.bashrc

这俩命令都不能执行。

Reply View the author
thepoy
deepin
2022-12-29 04:47
#3
wang3develop

失败。

source /etc/profile

vi ~/.bashrc

这俩命令都不能执行。

我写错了,bash的命令应该是 export PATH=/usr/bin

或者直接执行 /usr/bin/ls

Reply View the author
Feng Yu
deepin
2022-12-29 05:02
#4

很明显跟安装git没有任何关系,肯定是你自己不知道在哪瞎设置的环境变量,导致污染了PATH变量。你只能通过回忆你做的操作,然后还原这个配置解决

Reply View the author
wang3develop
deepin
2022-12-29 05:45
#5
thepoy

我写错了,bash的命令应该是 export PATH=/usr/bin

或者直接执行 /usr/bin/ls

感谢!现在有了点眉目。

之前执行source ~/.bashrc命令,有输出

bash: dircolors:未找到命令

没明白是什么。

现在执行 /usr/bin/vi ~/.bashrc命令,进配置文件看到有用到dircolors。

截图_选择区域_20221228214018.png

截图_选择区域_20221228213959.png

但,后面也不晓得怎么弄了。

Reply View the author
fuuko
deepin
2022-12-29 16:30
#6

我也遇到过一次,就是环境变量炸了,然后DDE都起不来

我记得Linux搜索环境变量的配置文件会搜三个地方,还有优先级的,你再找找?

Reply View the author
wang3develop
deepin
2022-12-31 18:28
#7

我重装了系统,再次安装,目前正常。

Reply View the author