zoukankan      html  css  js  c++  java
  • spark-shell和scala错误

    运行spark-shell 或者scala命令,出现以下错误:

    Welcome to Scala version 2.10.6 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_66).
    Type in expressions to have them evaluated.
    Type :help for more information.
    
    scala> [init] error: error while loading <root>, error in opening zip file
    
    Failed to initialize compiler: object scala.runtime in compiler mirror not found.
    ** Note that as of 2.8 scala does not assume use of the java classpath.
    ** For the old behavior pass -usejavacp to scala, or if using a Settings
    ** object programatically, settings.usejavacp.value = true.

    解决方法:删除下面以点开头的包
    cd /usr/lib/jvm/jdk1.8.0_66/jre/lib/ext/

    
    root@ha0:/usr/lib/jvm/jdk1.8.0_66/jre/lib/ext# ls -la
    
    total 25676
    
    drwxrwxr-x  2 501 root      4096 Feb  3 15:49 .
    
    drwxrwxr-x 15 501 root      4096 Feb  3 15:49 ..
    
    -rwxrwxr-x  1 501 staff      176 Oct  7 08:36 ._cldrdata.jar
    
    -rwxrwxr-x  1 501 root   3860522 Oct  7 08:36 cldrdata.jar
    
    -rwxrwxr-x  1 501 staff      176 Oct  7 08:36 ._dnsns.jar
    
    -rwxrwxr-x  1 501 root      8286 Oct  7 08:36 dnsns.jar
    
    -rwxrwxr-x  1 501 staff      176 Oct  7 08:36 ._jaccess.jar
    
    -rwxrwxr-x  1 501 root     44516 Oct  7 08:36 jaccess.jar
    
    -rwxrwxr-x  1 501 staff      176 Oct  7 04:00 ._jfxrt.jar
    
    -rwxrwxr-x  1 501 root  18467564 Oct  7 04:00 jfxrt.jar
    
    -rwxrwxr-x  1 501 staff      176 Oct  7 08:36 ._localedata.jar
    
    -rwxrwxr-x  1 501 root   1178935 Oct  7 08:36 localedata.jar
    
    -rwxrwxr-x  1 501 staff      176 Oct  7 08:37 ._meta-index
    
    -rwxrwxr-x  1 501 root      1269 Oct  7 08:37 meta-index
    
    -rwxrwxr-x  1 501 staff      176 Oct  7 08:36 ._nashorn.jar
    
    -rwxrwxr-x  1 501 root   2015935 Oct  7 08:36 nashorn.jar
    
    -rwxrwxr-x  1 501 staff      176 Oct  7 08:36 ._sunec.jar
    
    -rwxrwxr-x  1 501 root     39771 Oct  7 08:36 sunec.jar
    
    -rwxrwxr-x  1 501 staff      176 Oct  7 08:36 ._sunjce_provider.jar
    
    -rwxrwxr-x  1 501 root    278680 Oct  7 08:36 sunjce_provider.jar
    
    -rwxrwxr-x  1 501 staff      176 Oct  7 08:36 ._sunpkcs11.jar
    
    -rwxrwxr-x  1 501 root    250826 Oct  7 08:36 sunpkcs11.jar
    
    -rwxrwxr-x  1 501 staff      176 Oct  7 08:36 ._zipfs.jar
    
    -rwxrwxr-x  1 501 root     68849 Oct  7 08:36 zipfs.jar
    
    root@ha0:/usr/lib/jvm/jdk1.8.0_66/jre/lib/ext# rm ._*.jar
    
    root@ha0:/usr/lib/jvm/jdk1.8.0_66/jre/lib/ext# ls -la
    
    total 25636
    
    drwxrwxr-x  2 501 root      4096 Feb 25 18:01 .
    
    drwxrwxr-x 15 501 root      4096 Feb  3 15:49 ..
    
    -rwxrwxr-x  1 501 root   3860522 Oct  7 08:36 cldrdata.jar
    
    -rwxrwxr-x  1 501 root      8286 Oct  7 08:36 dnsns.jar
    
    -rwxrwxr-x  1 501 root     44516 Oct  7 08:36 jaccess.jar
    
    -rwxrwxr-x  1 501 root  18467564 Oct  7 04:00 jfxrt.jar
    
    -rwxrwxr-x  1 501 root   1178935 Oct  7 08:36 localedata.jar
    
    -rwxrwxr-x  1 501 staff      176 Oct  7 08:37 ._meta-index
    
    -rwxrwxr-x  1 501 root      1269 Oct  7 08:37 meta-index
    
    -rwxrwxr-x  1 501 root   2015935 Oct  7 08:36 nashorn.jar
    
    -rwxrwxr-x  1 501 root     39771 Oct  7 08:36 sunec.jar
    
    -rwxrwxr-x  1 501 root    278680 Oct  7 08:36 sunjce_provider.jar
    
    -rwxrwxr-x  1 501 root    250826 Oct  7 08:36 sunpkcs11.jar
    
    -rwxrwxr-x  1 501 root     68849 Oct  7 08:36 zipfs.jar
    
    root@ha0:/usr/lib/jvm/jdk1.8.0_66/jre/lib/ext# scala
    
  • 相关阅读:
    asp.net的TextBox回车触发事件
    asp.net 多条件查询
    A Brief History of My Blogs
    每日英语:Singular Success: China’s BillionDollar Hallmark Holiday
    Mat基本图像容器(转)
    VS2010与matlab R2011b混合编程遇到问题及解决
    SIFT算法研究 【转】
    matlab学习:人脸识别之LBP (Local Binary Pattern)
    每日英语:In the Future, Who Will Need Teachers?
    matlab学习:人脸识别之HOG(Histograms of Oriented Gradients)
  • 原文地址:https://www.cnblogs.com/ggzone/p/5222565.html
Copyright © 2011-2022 走看看