centos下使用该命令:sudo alternatives --display hadoop-0.20-conf ,提示:sudo: alternatives:command not found

  问题原因:找不到alternatives命令,因为/etc/profile/下的path 不包括该命令所在位置的路径/usr/sbin。解决方法:sudo nano /etc/profile ,在文件中path后面加上:/usr/sbin(注意前面有个冒号,以与前面的文件路径分割)。然后source /etc/profile ,再执行最初的alternatives命令就成功了。

相关文章:

  • 2021-08-22
  • 2021-11-21
  • 2022-02-21
  • 2021-05-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-25
  • 2021-09-08
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
相关资源
相似解决方案