[lxc-users] error while loading shared libraries: liblxc.so.1

Phiho Hoang hohoangphi at gmail.com
Sun May 25 19:52:39 UTC 2014


Hi S.Çağlar Onur,

> See
https://stackoverflow.com/questions/8633461/how-to-keep-environment-variables-when-using-sudo

Thank you for the tip. That's very helpful

PhiHo



On Sun, May 25, 2014 at 3:30 PM, S.Çağlar Onur <caglar at 10ur.org> wrote:

> On Sun, May 25, 2014 at 3:07 PM, Phiho Hoang <hohoangphi at gmail.com> wrote:
> > P.S: The problem seems to be resolved with:
> >
> > $  sudo cp /usr/local/lib/liblxc* /usr/lib/x86_64-linux-gnu
> >
> > $ sudo lxc-create --version
> > 1.0.0
> >
> > It is much appreciated if LXC gurus would advise if this is the proper
> way
> > to use LXC from github
> > I know I must have missed something important in the process.
> >
> > PPS: Is it correct that the current version of LXC on the github is
> 1.0.0?
> > Should it be 1.0.4?
>
> I believe your problem is nothing to do with LXC. sudo, by default,
> does not preserve the environment variables. I believe you are
> exporting LD_LIBRARY_PATH as a user and sudo is clearing them before
> running the command. See
>
> https://stackoverflow.com/questions/8633461/how-to-keep-environment-variables-when-using-sudo
>
> > Best regards,
> >
> > PhiHo
> >
> >
> >
> >
> > On Sun, May 25, 2014 at 1:45 AM, Phiho Hoang <hohoangphi at gmail.com>
> wrote:
> >>
> >> Dear List,
> >>
> >> This is my environment:
> >>
> >> $ uname -a
> >> Linux lxc1 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014
> >> x86_64 x86_64 x86_64 GNU/Linux
> >>
> >>  `./autogen.sh; ./configure; make; sudo make install' seem to complete
> >> successfully.
> >>
> >> However:
> >>
> >> $ sudo lxc-create --version
> >> lxc-create: error while loading shared libraries: liblxc.so.1: cannot
> open
> >> shared object file: No such file or directory
> >>
> >> 'liblxc.so*' seem to exist:
> >>
> >> $ ls -l /usr/local/lib/liblxc.so*
> >> total 1740
> >> lrwxrwxrwx 1 root root       11 May 25 01:16 liblxc.so -> liblxc.so.1
> >> lrwxrwxrwx 1 root root       15 May 25 01:16 liblxc.so.1 ->
> >> liblxc.so.1.0.0
> >> -rwxr-xr-x 1 root root  1754956 May 25 01:16 liblxc.so.1.0.0
> >>
> >> and '/usr/local/lib' is in LD_LIBRARY_PATH:
> >>
> >> $ echo $LD_LIBRARY_PATH
> >> :/usr/local/lib:/usr/lib:/lib
> >>
> >> Thank you for your help.
> >>
> >> Best regards,
> >>
> >> PhiHo
> >>
> >
> >
> > _______________________________________________
> > lxc-users mailing list
> > lxc-users at lists.linuxcontainers.org
> > http://lists.linuxcontainers.org/listinfo/lxc-users
>
>
>
> --
> S.Çağlar Onur <caglar at 10ur.org>
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140525/95ef2dbc/attachment-0001.html>


More information about the lxc-users mailing list