Ubuntu 18.04 安裝floodlight 過程失敗

上网、浏览、聊天、下载等
回复
lamtw1040
帖子: 3
注册时间: 2020-01-03 15:21
系统: Windows 10
送出感谢: 1 次
接收感谢: 0

Ubuntu 18.04 安裝floodlight 過程失敗

#1

帖子 lamtw1040 » 2020-01-09 17:03

你好,小弟需要在Ubuntu 18.04 的环境安装floodlight controller。
首先,我需要安装java环境和ant,之后再安装floodlight controller
但是,当我安装floodlight controller 和 ant 的时候遇到一些问题,我参考了一下网址去安装:
https://www.cnblogs.com/pullself/p/10259420.html
首先,我使用了终端机输入以下指令:

代码: 全选

sudo apt-get install build-essential default-jdk ant python-dev

代码: 全选

sudo git clone git://github.com/floodlight/floodlight.git

代码: 全选

cd floodlight
然后,当我输入以下指令就遇到以下问题:

代码: 全选

sudo floodlight
Buildfile: /home/lamtw/floodlight/build.xml
[taskdef] Could not load definitions from resource tasks.properties. It could not be found.
图片


因此,我有跟从参考网址输入以下指令:

代码: 全选

sudo git checkout v0.90
然后,我再次输入 sudo ant,但是我就看到另一个问题:
图片

我目前不知道该怎么处理这问题,希望你们帮到我,谢谢~~
头像
astolia
论坛版主
帖子: 4745
注册时间: 2008-09-18 13:11
送出感谢: 1 次
接收感谢: 797 次

Re: Ubuntu 18.04 安裝floodlight 過程失敗

#2

帖子 astolia » 2020-01-09 22:41

你链接的文章就是一个自己都搞不清楚错误原因的人稀里糊涂乱碰出来的“解决方法”。

你和他遇到的问题的根本原因是,他安装命令中的default-jdk会依赖openjdk 11,而openjdk里面不包含javafx组件,所以遇到代码里import
javafx.util.Pair时会出错,也导致了后面代码中用到Pair时也会出错。

如果知道这个根本原因的话,处理起来很简单,直接sudo apt install openjfx,把javafx补上就好了

他的解决方法1,本质上就是因为出错的代码是在负载平衡和统计两个模块里面,然后就换用不包含这两个功能模块的老版本。
他的解决方法2,本质上就是换用一个包含了javafx的jdk实现。

而你用老版本后遇到的问题,本质上是不同版本的混用导致的。你没用ant clean清理新版本编译出的东西。
这些用户感谢了作者 astolia 于这个帖子:
lamtw1040 (2020-01-10 16:16)
评价: 3.7%
lamtw1040
帖子: 3
注册时间: 2020-01-03 15:21
系统: Windows 10
送出感谢: 1 次
接收感谢: 0

Re: Ubuntu 18.04 安裝floodlight 過程失敗

#3

帖子 lamtw1040 » 2020-01-10 17:08

根据你讲的方法,我有照着安装openjfx,但是再次sudo ant clean 和sudo ant 还是有同样的问题发生......

图片
图片
图片
图片
图片
图片

最后我有输入 java -version 查过一下资讯,我看到的 openjdk version 是 11.0.5
会不会是因为openjdk version 的问题所致?
头像
astolia
论坛版主
帖子: 4745
注册时间: 2008-09-18 13:11
送出感谢: 1 次
接收感谢: 797 次

Re: Ubuntu 18.04 安裝floodlight 過程失敗

#4

帖子 astolia » 2020-01-12 16:04

是的,它只支持java 8,java 11的openjfx里没有javafx.util
删掉安装的java 11,重新安装java 8,并把openjfx降级到java 8版就行了

代码: 全选

sudo apt install default-jdk-headless- default-jre-headless- openjdk-11-jre-headless- openjdk-8-jdk openjfx=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2
做完后由于openjfx的对java 8和java 11的两个版本没有分开来,可能会不小心又升级到11版去了,所以可以锁定一下版本不让它升级

代码: 全选

sudo apt-mark hold libopenjfx-java libopenjfx-jni openjfx
XiaoXin123
帖子: 1
注册时间: 2020-06-21 9:19
送出感谢: 0
接收感谢: 0

Re: Ubuntu 18.04 安裝floodlight 過程失敗

#5

帖子 XiaoXin123 » 2020-06-21 9:22

你好,请问你的问题解决了吗?
我也用了版主的方法但是显示他的那些version not found
头像
astolia
论坛版主
帖子: 4745
注册时间: 2008-09-18 13:11
送出感谢: 1 次
接收感谢: 797 次

Re: Ubuntu 18.04 安裝floodlight 過程失敗

#6

帖子 astolia » 2020-06-22 11:38

XiaoXin123 写了:
2020-06-21 9:22
你好,请问你的问题解决了吗?
我也用了版主的方法但是显示他的那些version not found
你是在用20.04吧。20.04的源里面不再包含openjfx8的东西了。你需要额外添加18.04的源

代码: 全选

deb https://mirrors.aliyun.com/ubuntu bionic universe
deb https://mirrors.aliyun.com/ubuntu bionic-updates universe
deb https://mirrors.aliyun.com/ubuntu bionic-security universe
把这三行加到/etc/apt/sources.list里面,sudo apt update一次,再按上面的做
weny22
帖子: 1
注册时间: 2020-06-27 10:45
系统: ubuntu
送出感谢: 0
接收感谢: 0

Re: Ubuntu 18.04 安裝floodlight 過程失敗

#7

帖子 weny22 » 2020-06-27 11:04

您好,我已经将openjava 11变更为poenjava 8,但ant编译还是报错,请问这是为什么?

Buildfile: /home/wenycline/floodlight/build.xml
[taskdef] Could not load definitions from resource tasks.properties. It could not be found.

init:

compile:
[javac] Compiling 594 source files to /home/wenycline/floodlight/target/bin
[javac] /home/wenycline/floodlight/lib/gen-java/net/floodlightcontroller/packetstreamer/thrift/PacketStreamer.java:428: error: cannot find symbol
[javac] public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
[javac] ^
[javac] symbol: class TBaseAsyncProcessor
[javac] location: package org.apache.thrift
[javac] /home/wenycline/floodlight/lib/gen-java/net/floodlightcontroller/packetstreamer/thrift/PacketStreamer.java:434: error: cannot find symbol
[javac] protected AsyncProcessor(I iface, java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
[javac] ^
[javac] symbol: class AsyncProcessFunction
[javac] location: package org.apache.thrift
[javac] /home/wenycline/floodlight/lib/gen-java/net/floodlightcontroller/packetstreamer/thrift/PacketStreamer.java:438: error: cannot find symbol
[javac] private static <I extends AsyncIface> java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
[javac] ^
[javac] symbol: class AsyncProcessFunction
[javac] location: package org.apache.thrift
[javac] /home/wenycline/floodlight/lib/gen-java/net/floodlightcontroller/packetstreamer/thrift/PacketStreamer.java:438: error: cannot find symbol
[javac] private static <I extends AsyncIface> java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
[javac] ^
[javac] symbol: class AsyncProcessFunction
[javac] location: package org.apache.thrift
[javac] /home/wenycline/floodlight/lib/gen-java/net/floodlightcontroller/packetstreamer/thrift/PacketStreamer.java:446: error: cannot find symbol
[javac] public static class getPackets<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPackets_args, java.util.List<java.nio.ByteBuffer>> {
[javac] ^
[javac] symbol: class AsyncProcessFunction
[javac] location: package org.apache.thrift
[javac] /home/wenycline/floodlight/lib/gen-java/net/floodlightcontroller/packetstreamer/thrift/PacketStreamer.java:455: error: cannot find symbol
[javac] public org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.nio.ByteBuffer>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
[javac] ^
[javac] symbol: class AsyncFrameBuffer
[javac] location: class AbstractNonblockingServer
[javac] /home/wenycline/floodlight/lib/gen-java/net/floodlightcontroller/packetstreamer/thrift/PacketStreamer.java:507: error: cannot find symbol
[javac] public static class pushMessageSync<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, pushMessageSync_args, java.lang.Integer> {
[javac] ^
[javac] symbol: class AsyncProcessFunction
[javac] location: package org.apache.thrift
[javac] /home/wenycline/floodlight/lib/gen-java/net/floodlightcontroller/packetstreamer/thrift/PacketStreamer.java:516: error: cannot find symbol
[javac] public org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
[javac] ^
[javac] symbol: class AsyncFrameBuffer
[javac] location: class AbstractNonblockingServer
[javac] /home/wenycline/floodlight/lib/gen-java/net/floodlightcontroller/packetstreamer/thrift/PacketStreamer.java:569: error: cannot find symbol
[javac] public static class pushMessageAsync<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, pushMessageAsync_args, Void> {
[javac] ^
[javac] symbol: class AsyncProcessFunction
[javac] location: package org.apache.thrift
[javac] /home/wenycline/floodlight/lib/gen-java/net/floodlightcontroller/packetstreamer/thrift/PacketStreamer.java:578: error: cannot find symbol
[javac] public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
[javac] ^
[javac] symbol: class AsyncFrameBuffer
[javac] location: class AbstractNonblockingServer
[javac] /home/wenycline/floodlight/lib/gen-java/net/floodlightcontroller/packetstreamer/thrift/PacketStreamer.java:603: error: cannot find symbol
[javac] public static class terminateSession<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, terminateSession_args, Void> {
[javac] ^
[javac] symbol: class AsyncProcessFunction
[javac] location: package org.apache.thrift
[javac] /home/wenycline/floodlight/lib/gen-java/net/floodlightcontroller/packetstreamer/thrift/PacketStreamer.java:612: error: cannot find symbol
[javac] public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
[javac] ^
[javac] symbol: class AsyncFrameBuffer
[javac] location: class AbstractNonblockingServer
[javac] /home/wenycline/floodlight/lib/gen-java/net/floodlightcontroller/packetstreamer/thrift/OFMessageType.java:56: error: package org.apache.thrift.annotation does not exist
[javac] @org.apache.thrift.annotation.Nullable
[javac] ^
[javac] /home/wenycline/floodlight/lib/gen-java/net/floodlightcontroller/packetstreamer/thrift/Message.java:20: error: package org.apache.thrift.annotation does not exist
[javac] public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> sessionIDs; // required
[javac] ^
[javac] /home/wenycline/floodlight/lib/gen-java/net/floodlightcontroller/packetstreamer/thrift/Message.java:21: error: package org.apache.thrift.annotation does not exist
[javac] public @org.apache.thrift.annotation.Nullable Packet packet; // required
[javac] ^
[javac] /home/wenycline/floodlight/lib/gen-java/net/floodlightcontroller/packetstreamer/thrift/Message.java:138: error: package org.apache.thrift.annotation does not exist
[javac] @org.apache.thrift.annotation.Nullable


总共报了100条错误 :Cry :Cry
onlylove
论坛版主
帖子: 4883
注册时间: 2007-01-14 16:23
送出感谢: 2 次
接收感谢: 142 次

Re: Ubuntu 18.04 安裝floodlight 過程失敗

#8

帖子 onlylove » 2020-06-27 11:12

/home/wenycline/floodlight/lib/gen-java/net/floodlightcontroller/packetstreamer/thrift/Message.java:138: error: package org.apache.thrift.annotation does not exist
头像
oneleaf
论坛管理员
帖子: 10373
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04
送出感谢: 7 次
接收感谢: 116 次

Re: Ubuntu 18.04 安裝floodlight 過程失敗

#9

帖子 oneleaf » 2020-06-27 11:48

直接上 docker 不好吗?主机的环境能不动就不动。
Po.Liu
帖子: 1
注册时间: 2020-07-15 16:59
系统: windows10
送出感谢: 0
接收感谢: 0

Re: Ubuntu 18.04 安裝floodlight 過程失敗

#10

帖子 Po.Liu » 2020-07-15 17:04

weny22 写了:
2020-06-27 11:04
您好,我已经将openjava 11变更为poenjava 8,但ant编译还是报错,请问这是为什么?

Buildfile: /home/wenycline/floodlight/build.xml
[taskdef] Could not load definitions from resource tasks.properties. It could not be found.

init:

compile:
[javac] Compiling 594 source files to /home/wenycline/floodlight/target/bin
[javac] /home/wenycline/floodlight/lib/gen-java/net/floodlightcontroller/packetstreamer/thrift/PacketStreamer.java:428: error: cannot find symbol
[javac] public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
[javac] ^
[javac] symbol: class TBaseAsyncProcessor
[javac] location: package org.apache.thrift
[javac] /home/wenycline/floodlight/lib/gen-java/net/floodlightcontroller/packetstreamer/thrift/PacketStreamer.java:434: error: cannot find symbol
[javac] protected AsyncProcessor(I iface, java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
[javac] ^
......

总共报了100条错误 :Cry :Cry
因为你用了master tree. 改用1.2的tag就ok了。
回复

回到 “互联网相关软件”