zoukankan      html  css  js  c++  java
  • "etc/profile" E212: Can't open file for writing

    今天安装Java环境,出现如下错误:

    "etc/profile" E212: Can't open file for writing

    这是安装到本地JDK路径不正确导致。怎么办呢?那就设置路径呀。

    输入这条指令   sudo vim etc/profile   报错啊,权限不够,那我们找他领导解决呀:

    sudo vi hosts   再次编辑即可,可能会用到的指令:

    # System-wide .profile for sh(1)

     

    if [ -x /usr/libexex/path_helper ]; then eval '/usr/libexec/path_helper -s'

     

    fi

     

    if [ "${BASH-no}" != "no" ]; then 

            [ -r /etc/bashrc ] && . /etc/bashrc

    fi

     

    #配置 JAVA_HOME,此处路径根据自己的版本填写

    JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/"

    CLASS_PATH="$JAVA_HOME/lib"

    PATH=".;$PATH:$JAVA_HOME/bin"

     

  • 相关阅读:
    一次完整的HTTP事务的过程
    移动端事件
    canvas 在视频中的用法
    理解Vue
    改变console.log的输出样式
    百度下拉搜索案例
    Vue总结
    字符串、正则
    .Net Mvc框架知识点
    Lowest Common Ancestor of a Binary Tree -- LeetCode
  • 原文地址:https://www.cnblogs.com/sandyzhang/p/6782125.html
Copyright © 2011-2022 走看看