CentOS下 dotnet: command not found

2020-08-30 17:50发布

复制代码
CentOS 8,之前装的2.1是正常的,然后卸载了,再装了3.1的SDK就炸了,始终command not found

[root@iZwz9883ha8ul4wcjros0tZ /]# sudo dnf install dotnet-sdk-3.1
Last metadata expiration check:
2:55:32 ago on Sat 29 Aug 2020 06:44:23 PM CST. Package dotnet-sdk-3.1-3.1.401-1.x86_64 is already installed.
Dependencies resolved.
Nothing to
do.
Complete
!
[root@iZwz9883ha8ul4wcjros0tZ /]# dotnet --info
-
bash: dotnet: command not found
[root@iZwz9883ha8ul4wcjros0tZ
/]# whereis dotnet
dotnet:
/usr/bin/dotnet /usr/lib64/dotnet /etc/dotnet /usr/local/bin/dotnet /usr/share/dotnet /usr/share/man/man1/dotnet.1.gz
[root@iZwz9883ha8ul4wcjros0tZ
/]# ls /usr/bin/dotnet/sdk
3.1.401
[root@iZwz9883ha8ul4wcjros0tZ
/]# ls /usr/lib64/dotnet
host packs shared
[root@iZwz9883ha8ul4wcjros0tZ
/]# ls /usr/local/bin/dotnet/sdk
3.1.401
[root@iZwz9883ha8ul4wcjros0tZ
/]# ls /usr/share/dotnet/sdk
3.1.401
[root@iZwz9883ha8ul4wcjros0tZ
/]#
复制代码

2条回答
我想做一个坏孩纸
2楼-- · 2020-08-30 18:34

试试 https://github.com/dotnet/runtime/issues/2929 中的方法

sudo ln -sf /usr/share/dotnet/dotnet /usr/local/bin/dotnet
查看更多
做自己的国王
3楼-- · 2020-08-30 18:37

确定装好了?要环境变量的吧

查看更多
登录 后发表回答