配置:错误:找不到libopenvswitch.a。尝试--with-ovs-libpath

时间:2018-11-21 11:17:39

标签: sdn openvswitch

当我使用此命令时:

./configure --with-ovs-srcdir=/home/mx/SDN/openvswitch-2.10.1 PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/

我得到了错误结果:

configure: error: libopenvswitch.a was not found. Try --with-ovs-libpath

但是在我的计算机上,我可以找到libopenvswitch.a文件:

/lib/libopenvswitch.a 
/usr/local/lib/libopenvswitch.a
/home/mx/SDN/openvswitch-2.10.1/lib/.libs/libopenvswitch.a

但是我使用命令:

./configure --with-ovs-srcdir=/home/mx/SDN/openvswitch-2.10.1 --with-ovs-libpath=/lib/ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/

或命令:

./configure --with-ovs-srcdir=/home/mx/SDN/openvswitch-2.10.1 --with-ovs-libpath=/usr/local/lib/ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/

或命令:

./configure --with-ovs-srcdir=/home/mx/SDN/openvswitch-2.10.1 --with-ovs-libpath=/home/mx/SDN/openvswitch-2.10.1/lib/.libs/ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/

全部得到相同的错误结果:

configure: error: libopenvswitch.a was not found. Try --with-ovs-libpath

请帮助我,谢谢!

1 个答案:

答案 0 :(得分:0)

您需要 Open vSwitch的2.3.1版本来构建OF-CONFIG。


如果尝试使用最新版本的Open vSwitch安装OF-CONFIG,我可以重现您的问题:

$ ./configure --with-ovs-srcdir=/ovs PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
...
configure: error: libopenvswitch.a was not found. Try --with-ovs-libpath

但是,如果我安装Open vSwitch 2.3.1,则一切都会按预期进行:

$ wget http://openvswitch.org/releases/openvswitch-2.3.1.tar.gz
$ tar -xf openvswitch-2.3.1.tar.gz
$ cd openvswitch-2.3.1/
$ ./configure --prefix=/ --datarootdir=/usr/share
...
$ make -j && sudo make install -j
...

$ cd /of-config
$ ./configure --with-ovs-srcdir=/openvswitch-2.3.1 PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
...
$ echo $?
0