Works for me:
root@sauce:~# cat > testme.c << EOF > #include <stdio.h> > > int main() { printf("hello, world\n"); } > EOF root@sauce:~# gcc -o testme testme.c -lvirt-lxc /usr/bin/ld: cannot find -lvirt-lxc collect2: error: ld returned 1 exit status
root@sauce:~# apt-get update root@sauce:~# apt-get -y install libvirt-dev root@sauce:~# dpkg -l | grep libvirt-dev ii libvirt-dev 1.1.1-0ubuntu8.9 amd64 development files for the libvirt library root@sauce:~# cat > testme.c << EOF > #include <stdio.h> > > int main() { printf("hello, world\n"); } > EOF root@sauce:~# gcc -o testme testme.c -lvirt-lxc root@sauce:~# ./testme hello, world
Works for me:
root@sauce:~# cat > testme.c << EOF
> #include <stdio.h>
>
> int main() { printf("hello, world\n"); }
> EOF
root@sauce:~# gcc -o testme testme.c -lvirt-lxc
/usr/bin/ld: cannot find -lvirt-lxc
collect2: error: ld returned 1 exit status
root@sauce:~# apt-get update
root@sauce:~# apt-get -y install libvirt-dev
root@sauce:~# dpkg -l | grep libvirt-dev
ii libvirt-dev 1.1.1-0ubuntu8.9 amd64 development files for the libvirt library
root@sauce:~# cat > testme.c << EOF
> #include <stdio.h>
>
> int main() { printf("hello, world\n"); }
> EOF
root@sauce:~# gcc -o testme testme.c -lvirt-lxc
root@sauce:~# ./testme
hello, world