如何在 raring 上安装 Open vSwitch?我找不到任何关于此的官方 Ubuntu 文档。
DevStack似乎是这样做的:
kernel_version=`cat /proc/version | cut -d " " -f3`
apt-get install make fakeroot dkms openvswitch-switch openvswitch-datapath-dkms linux-headers-$kernel_version
另一方面,这个博客做这个:
apt-get install openvswitch-datapath-source openvswitch-common openvswitch-switch
答案1
尝试一下:
sudo apt-get install openvswitch-switch
您提到的许多软件包应该是依赖项,另外,如果您下载安全更新,您可能已经拥有 Linux 标头,因此您可能不需要 apt-get 所有这些。就是这样。请参见下面的 12.04 更新后的标头。它并不顺利,但您可以看到依赖项。
xenuser@LabXen:~$ sudo apt-get install openvswitch-switch
[sudo] password for xenuser:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
dkms fakeroot openvswitch-common openvswitch-datapath-dkms
Suggested packages:
ethtool
The following NEW packages will be installed:
dkms fakeroot openvswitch-common openvswitch-datapath-dkms
openvswitch-switch
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,987 kB of archives.
After this operation, 17.3 MB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main dkms all 2.2.0.3-1ubuntu3.1 [73.2 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise/main fakeroot amd64 1.18.2-1 [87.2 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ precise-updates/universe openvswitch-common amd64 1.4.0-1ubuntu1.5 [547 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ precise-updates/universe openvswitch-datapath-dkms all 1.4.0-1ubuntu1.5 [2,007 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu/ precise-updates/universe openvswitch-switch amd64 1.4.0-1ubuntu1.5 [1,273 kB]
Fetched 3,987 kB in 6s (582 kB/s)
Selecting previously unselected package dkms.
(Reading database ... 184811 files and directories currently installed.)
Unpacking dkms (from .../dkms_2.2.0.3-1ubuntu3.1_all.deb) ...
Selecting previously unselected package fakeroot.
Unpacking fakeroot (from .../fakeroot_1.18.2-1_amd64.deb) ...
Selecting previously unselected package openvswitch-common.
Unpacking openvswitch-common (from .../openvswitch-common_1.4.0-1ubuntu1.5_amd64.deb) ...
Selecting previously unselected package openvswitch-datapath-dkms.
Unpacking openvswitch-datapath-dkms (from .../openvswitch-datapath-dkms_1.4.0-1ubuntu1.5_all.deb) ...
Selecting previously unselected package openvswitch-switch.
Unpacking openvswitch-switch (from .../openvswitch-switch_1.4.0-1ubuntu1.5_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up dkms (2.2.0.3-1ubuntu3.1) ...
Setting up fakeroot (1.18.2-1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode.
Setting up openvswitch-common (1.4.0-1ubuntu1.5) ...
Setting up openvswitch-datapath-dkms (1.4.0-1ubuntu1.5) ...
Creating symlink /var/lib/dkms/openvswitch/1.4.0/source ->
/usr/src/openvswitch-1.4.0
DKMS: add completed.
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area....(bad exit status: 2)
./configure --with-linux='/lib/modules/3.8.0-32-generic/build' && make -C datapath/linux......(bad exit status: 1)
Error! Bad return status for module build on kernel: 3.8.0-32-generic (x86_64)
Consult /var/lib/dkms/openvswitch/1.4.0/build/make.log for more information.
Setting up openvswitch-switch (1.4.0-1ubuntu1.5) ...
* Inserting openvswitch module
* /etc/openvswitch/conf.db does not exist
* Creating empty database /etc/openvswitch/conf.db
* Starting ovsdb-server
* Configuring Open vSwitch system IDs
* Starting ovs-vswitchd
* Enabling gre with iptables
xenuser@LabXen:~$