CUDA with Fedora Core 6 Howto install and run CUDA with FC6

After installing CUDA on a machine with Fedora Core 6 I saw the following problem when I tried to run SDK examples:

[lessig@park]$ ./bin/linux/release/template
./bin/linux/release/template: error while loading shared libraries: /usr/local/cuda/lib/ cannot restore segment prot after reloc: Permission denied

The solution was to change the SELINUX settings for the CUDA lib directory:

[root@park]# chcon -t texrel_shlib_t /usr/local/cuda/lib/*.so

I suspect that the same problem could occur on other machines with SELINUX.