0

I tried to run tut01-skeleton-derv.c example under xenomai-x.x/examples/rtdm/deriver-api/. I run makefile without error. The command of in tut01-skeleton-derv.c file says that :

To test this application, you just need to:

 $ export LD_LIBRARY_PATH=<path of xenomai>/lib
 $ insmod tut01-skeleton-drv.ko
 $ ./tut01-skeleton-app

Firstly, I run export LD_LIBRARY_PATH=/usr/xenomai/lib/ on terminal, it was ok. When I run sudo insmod tut01-skeleton-drv.ko, an error occured. "Could not insert module tut01-skeleton-drv.ko: Can not allocate memory". What should I do?

  • Are you actually running `insmod` as a regular user and not root? Usually you need to be root to load kernel modules. – nobody Oct 28 '14 at 16:20
  • I try "sudo insmod tut01-skeleton-drv.ko", there is same error. –  Oct 28 '14 at 16:23

1 Answers1

0

sudo does not use the local environment variable. So when you run export LD_LIBRARY_PATH=/usr/xenomai/lib/ as a user then sudo your next command, the environment variable LD_LIBRARY_PATH is not set. Try to change user to root then run the commands.

ChisholmKyle
  • 449
  • 3
  • 10