./contrail.sh构建失败并显示错误“致命错误:grok.h:没有这样的文件或目录”

时间:2017-10-05 14:09:49

标签: openstack sdn openstack-neutron

我使用以下github链接通过contrail-installer安装opencontrail。 https://github.com/Juniper/contrail-installer.git

克隆了contrail-installer并从samples目录中复制了localrc,之后我在master分支中运行了 ./contact.sh build ,它给了我以下错误。任何人都可以帮我解决这个问题。

2017-10-05 18:32:27 mkdir /opt/stack/contrail/build/include/dns
2017-10-05 18:32:27 mkdir /opt/stack/contrail/build/include/dst
2017-10-05 18:32:27 mkdir /opt/stack/contrail/build/include/isccfg
2017-10-05 18:32:27 mkdir /opt/stack/contrail/build/include/bind9
2017-10-05 18:32:27 mkdir /opt/stack/contrail/build/include/lwres
2017-10-05 18:32:27 mkdir /opt/stack/contrail/build/share
2017-10-05 18:32:27 mkdir /opt/stack/contrail/build/share/man
2017-10-05 18:32:27 mkdir /opt/stack/contrail/build/share/man/man3
2017-10-05 18:32:27 mkdir /opt/stack/contrail/build/include/irs
2017-10-05 18:32:27 mkdir /opt/stack/contrail/build/share/man/man5
2017-10-05 18:32:27 mkdir /opt/stack/contrail/build/share/man/man8
2017-10-05 18:32:27 mkdir /opt/stack/contrail/build/share/man/man1
2017-10-05 18:32:27 mkdir /opt/stack/contrail/build/var 
2017-10-05 18:32:27 mkdir /opt/stack/contrail/build/var/run
2017-10-05 18:32:27 mkdir /opt/stack/contrail/build/etc
2017-10-05 18:32:27 build/production/analytics/viz_constants.cpp: In           constructor 'vizConstants::vizConstants()':
2017-10-05 18:32:27 build/production/analytics/viz_constants.cpp:20:1: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without
2017-10-05 18:32:27  vizConstants::vizConstants() {
2017-10-05 18:32:27  ^
2017-10-05 18:32:27 In file included from controller/src/analytics/viz_collector.h:23:0,
2017-10-05 18:32:27                  from controller/src/analytics/viz_collector.cc:5:
2017-10-05 18:32:27 controller/src/analytics/grok_parser.h:9:22: fatal error: grok.h: No such file or directory
2017-10-05 18:32:27      #include <grok.h>
2017-10-05 18:32:27                       ^
2017-10-05 18:32:27 compilation terminated.
2017-10-05 18:32:27 scons: *** [build/production/analytics/viz_collector.o] Error 1
2017-10-05 18:32:27 ++ ret_val=2
2017-10-05 18:32:27 ++ [[ 2 -ne 0 ]]
2017-10-05 18:32:27 ++ exit 2
2017-10-05 18:32:27 ++ clean
2017-10-05 18:32:27 ++ local r=2
2017-10-05 18:32:27 ++ echo 'exited with status :2'
2017-10-05 18:32:27 ++ exit 2

localrc文件包含以下内容。

STACK_DIR=$(cd $(dirname $0) && pwd)

LOG_DIR=$STACK_DIR/log/screens
LOG=True
DEBUG=True
LOGFILE=$STACK_DIR/log/contrail.log
LOGDAYS=1
USE_SCREEN=True

DATABASE_PASSWORD=contrail123
RABBIT_PASSWORD=contrail123
SERVICE_TOKEN=contrail123
SERVICE_PASSWORD=contrail123
ADMIN_PASSWORD=contrail123

#set loglevel to 1/2/3 . Always stderr into logfile,console.
#For LOG_LEVEL 1 stdout into logfile.
#For LOG_LEVEL 2 stdout into logfile and xtrace commands into console.
#For LOG_LEVEL 3 stdout and xtrace into logfile,console.

LOG_LEVEL=3

SERVICE_TIMEOUT=180
SERVICE_HOST=localhost

#use only when INSTALL_PROFILE=COMPUTE, provide IP of compute node
#COMPUTE_HOST_IP=<IP of compute-node>

INSTALL_PROFILE=ALL
PHYSICAL_INTERFACE=eth0

# to get source code make it as False
CONTRAIL_DEFAULT_INSTALL=False

# default branch is master
# CONTRAIL_BRANCH=R3.0

# to get the ppa packages uncomment
# LAUNCHPAD_BRANCH=r2.20

# repo proto is https or (default) ssh. Leave commented for ssh
CONTRAIL_REPO_PROTO=https

# proto for openstack bits. Use HTTPS if git is firewalled
GIT_BASE=https://github.com

CASS_MAX_HEAP_SIZE=500M
CASS_HEAP_NEWSIZE=100M

# number of jobs used to build
# NB_JOBS=1

# target of the build debug/production
# TARGET=production                                                                                                                           

1 个答案:

答案 0 :(得分:1)

安装这些缺少的包:

$ apt-get install libgrok-dev libgrok1 libtokyocabinet-dev