-   Ubuntu (
-   -   Where libc? (

iqbala 05-01-2008 07:06 AM

Where libc?
After failures in trying to install Nvidia drivers with apt-get, I want to resort to the old method (Download driver from Nvidia site and letting it compile the proper modules).

But. I need to have a compiler and the kernel source installed. I cannot find them with Adept/apt-get.

I abilitated every source that was in the system.

Where shall I find them?

Sorry, new to Ubuntu. In mandriva I used to find them in a Rdrake package. I think it should be the same with apt, but am I wrong?


knudfl 05-01-2008 07:56 AM

Different names, they are there:
'nvidia-glx' install this first, may be the others just follows automatically,
or are already installed:
To set up x : '/usr/bin/nvidia-settings'
Good luck !

iqbala 05-01-2008 08:24 AM

I already tried to install nvidia-glx and failed (it installed but the results were poor, I get better definition with generic driver).

This is why I wanted to compile the driver in the old way.

What you are saying is, compiler (gcc, etc) and kernel source are in those packages "linux-restricted-etc."?

knudfl 05-01-2008 08:38 AM

The compiler is just 'gcc' but apt-get install build-essentials' gets the most,
I think. Both entries are also in synaptic.
May be you can do with the 'linux-headers' for nvidia install.
The full kernelsource is 'linux-source-2.6.xx...'

iqbala 05-02-2008 02:05 PM

If I type

sudo apt-get install build-essentials

I get the message "impossible to find build-essentials". Is something wrong with the source file of my apt? I decommented every line that I found on the file. Is there some source that I should insert by hand?

The same result if I type sudo apt-get install libc (by the way, I tried this because the message I get from Nvidia .run file is
You do not appear to have libc header files installed on your system.
Please install your distribution's libc development package.

iqbala 05-02-2008 02:17 PM

So I tried to install the linux-headers.
sudo apt-get install linux-headers-2.6.22-14-generic 2.6.22-14.52

Result: "there is nothing to install, your package is already at the most updates release"

So I DO have the headers. Why Nvidia installer is not finding them?


Anyway. I tried to find some package for kernel source (which is needed by the installer), so I typed

sudo apt-get source linux-source-2.6.22-14-generic

and I get the answer "impossible to find package..."

Can anybody help?

iqbala 05-02-2008 04:45 PM

OK, I found a different solution.
It appears that on Kubuntu you must not install Nvidia drivers with Nvidia installer because the linux-restricted-modules already contain the compiled modulus for Nvidia. I still do not know why that installer does not find the headers for libc, but however it is not necessary to use that installer.

I managed to install the binary driver with apt-get. I did not do it at first just because I tried and the result was horrible (lower performances than the generic "nv" driver". The problem was that I had to choose, for my particular card, the old "legacy" driver.

Now, you will say, couldn't you just have thoght of that earlier?

I did . Problem is that I had already tried, but that driver conflicts with my sound card. That problem still exist. But I just managed to get around it. I changed the system settings from ALSA to AUTODETECT, and it seems to do the trick.

Thank you everybody.

P.S.: should we notify somehow Nvidia that their installer does not have to be used with Kubuntu any more? May be hey should add some instruction specifically for Kubuntu like they do for SUSE...

knudfl 05-03-2008 03:51 AM

Sorry 'build-essentials' is a misspell. 'build-essential' is correct.

CITguy 05-07-2008 12:04 AM

Installation of the NVIDIA Drivers on Ubuntu 6.06+
Here's what you do.

1) Download the latest NVIDIA driver from

2) Run the following command:


sudo apt-get install libc6 libc6-dev xorg-dev linux-headers-`uname -r` make
3) Once those packages have installed, for Ubuntu run


sudo /etc/init.d/gdm stop
for Kubuntu, run

sudo /etc/init.d/kdm stop
This will throw you to a command line.

4) Press, ALT+F4 to switch to another virtual terminal. Then cd to the directory where you downloaded the NVIDIA driver .run file.

5) To make sure that we have functional X in the event of a problem. To backup your xorg.conf file, run:


sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_BKUP
6) Once that's done, run:


sudo sh ./NVIDIA*.run
  • * is the full name of the .run file.
  • Let the installer change the xorg.conf file.

7) To test the Driver, type:

8) The best way that I know to check the driver is to test the "Hufo's Tunnel" Screensaver to see if it is choppy.

9a) If all is working, issue the following command:
For Ubuntu:

sudo /etc/init.d/gdm restart
For Kubuntu:

sudo /etc/init.d/kdm restart
9b) The only problem I foresee that may arise is that the incorrect driver is being used. To change it, edit your xorg.conf to set the driver from "nv" to "nvidia" and it may resolve your issue.

9c) If there are any other problems, let me know.

Hope this helps.

iqbala 05-07-2008 04:16 PM

As I said, I managed to install it with APT-GET.

Or so I thought.

I installed 3 arcade games (alien arena, scorched earth and planet penguin racer) and the three of them give the same error : "*** ppracer error: Couldn't initialize video: Couldn't find matching GLX visual" or similar. Every error in the three games involves inability to find GLX visualization.

I remember that, in configuring X1186 config file there was a section "module" in which I had to type by hand "load glx" or something like that.

Now, Kubuntu uses Xorg.conf, and not the old X1186. In that file I did not find any section "module". Should I insert it by hand?

knudfl 05-08-2008 05:42 AM

Try: 'sudo nvidia-settings' to get a new setup of xorg.conf

iqbala 05-09-2008 12:20 PM

zeus@zeus-Eddye:~$ sudo nvidia-settings
sudo: nvidia-settings: command not found

iqbala 05-09-2008 12:28 PM

I tried this also:

nvidia-glx-config enable

I got:

FATAL: Error inserting battery (/lib/modules/2.6.22-14-generic/kernel/drivers/acpi/battery.ko): No such device

Warning: your X configuration has been succesfully changed.
In order to take full advantage of the changes, X needs to
be restarted.

iqbala 05-09-2008 02:50 PM

So I tried to install from NVIDIA installer, like explained by CITguy. Everything seemed OK. It compiled the kernel module and configured Xorg.conf.

But at the moment of loading KDE after reboot, it failed, giving a message such as

ERROR: you have driver nvidia xxx installed but the kernel module is not matching it (I quote by heart, I don't have a copy of the exact message".

So I uninstalled the driver, and tried an older version that I know used to work with my card.
It did not even finish to compile the kernel module, saying "Error: the module could not be compiled"

Any hint? It seems most strange especially the first error: the module has been compiled by the installer, so why is it mismatching?

Or may be it did not actually recompile the kernel because it could not find the source ? (I downloaded the source with apt-get source xxx but it downloaded on the desktop and I don't know where to place it...

iqbala 05-09-2008 03:35 PM

I post here the /var/log/nvidia-installer.log

nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Fri May 9 22:31:10 2008

option status:
license pre-accepted : false
update : false
force update : false
expert : false
uninstall : false
driver info : false
no precompiled interface: false
no ncurses color : false
query latest driver ver : false
OpenGL header files : true
no questions : false
silent : false
no backup : false
kernel module only : false
sanity : false
add this kernel : false
no runlevel check : false
no network : false
no ABI note : false
no RPMs : false
force tls : (not specified)
force compat32 tls : (not specified)
X install prefix : /usr/X11R6
OpenGL install prefix : /usr
compat32 install prefix : (not specified)
installer install prefix: /usr
utility install prefix : /usr
kernel name : (not specified)
kernel include path : (not specified)
kernel source path : (not specified)
kernel output path : (not specified)
kernel install path : (not specified)
proc mount point : /proc
ui : (not specified)
tmpdir : /tmp
ftp mirror :
RPM file list : (not specified)

Using: nvidia-installer ncurses user interface
-> License accepted.
-> No precompiled kernel interface was found to match your kernel; would you li
ke the installer to attempt to download a kernel interface for your kernel f
rom the NVIDIA ftp site ( (Answer: Yes)
-> No matching precompiled kernel interface was found on the NVIDIA ftp site;
this means that the installer will need to compile a kernel interface for
your kernel.
-> Kernel source path: '/lib/modules/2.6.22-14-generic/build'
-> Performing CC test with CC="cc".
-> Performing rivafb check.
-> Cleaning kernel module build directory.
executing: 'cd ./usr/src/nv; make clean'...
rm -f -f nv.o nv-vm.o os-agp.o os-interface.o os-registry.o nv.o nv-vm.o os-
agp.o os-interface.o os-registry.o nvidia.mod.o
rm -f -f build-in.o nv-linux.o *.d .*.{cmd,flags}
rm -f -f nvidia.{o,ko,mod.{o,c}} nv_compiler.h *~
rm -f -rf .tmp_versions
-> Building kernel module:
executing: 'cd ./usr/src/nv; make module SYSSRC=/lib/modules/2.6.22-14-gener
ic/build SYSOUT=/lib/modules/2.6.22-14-generic/build'...

NVIDIA: calling KBUILD...
make CC=cc KBUILD_VERBOSE=1 -C /lib/modules/2.6.22-14-generic/build SUBDIRS
=/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv modules
test -e include/linux/autoconf.h -a -e include/config/auto.conf || ( \
echo; \
echo " ERROR: Kernel configuration is invalid."; \
echo " include/linux/autoconf.h or include/config/auto.conf are mis
sing."; \
echo " Run 'make oldconfig && make prepare' on kernel src to fix it
."; \
echo; \
mkdir -p /tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/.tmp_vers
rm -f /tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/.tmp_version
make -f scripts/ obj=/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676
echo \#define NV_COMPILER \"`cc -v 2>&1 | tail -n 1`\" > /tmp/selfgz5266/NVI
cc -Wp,-MD,/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/.nv.o
.d -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.1.3/include -D__KERNEL_
_ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-protot
ypes -Wno-trigraphs -fno-strict-aliasing -fno-common -O2 -pipe -msoft-float
-mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i586 -m
tune=generic -ffreestanding -maccumulate-outgoing-args -Iinclude/asm-i386/
mach-default -fomit-frame-pointer -g -fno-stack-protector -Wdeclaration-aft
er-statement -Wno-pointer-sign -I/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-p
kg1/usr/src/nv -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subsc
ripts -Wparentheses -Wpointer-arith -Wno-multichar -Werror -O -fno-common
-MD -Wsign-compare -Wno-cast-qual -Wno-error -D_LOOSE_KERNEL_NAMES -D__KER
E=KBUILD_STR(nv)" -D"KBUILD_MODNAME=KBUILD_STR(nvidia)" -c -o /tmp/selfgz52
66/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/.tmp_nv.o /tmp/selfgz5266/NVIDI
In file included from /tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src
error: linux/config.h: No such file or directory
In file included from include/linux/list.h:8,
from include/linux/module.h:10,
from /tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src
from /tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src
include/linux/prefetch.h: In function ‘prefetch_range’:
include/linux/prefetch.h:62: warning: pointer of type ‘void *’ used in a
warning: "NV_ENABLE_MEM_TRACKING" is not defined
warning: "NV_ENABLE_MEM_TRACKING" is not defined
warning: #warning " failed, assuming remap_page_range(4)!"
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c: At top level
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c:65: warning:
‘kmem_cache_t’ is deprecated
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c:109:5: warnin
g: "DEBUG" is not defined
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c:129:5: warnin
g: "DEBUG" is not defined
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c:261: warning:
initialization from incompatible pointer type
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c:286:5: warnin
g: "NV_ENABLE_MEM_TRACKING" is not defined
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c: In function
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c:467: warning:
implicit declaration of function ‘pci_find_class’
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c:467: warning:
assignment makes pointer from integer without a cast
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c:481: warning:
assignment makes pointer from integer without a cast
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c: In function
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c:491: warning:
‘pci_find_device’ is deprecated (declared at include/linux/pci.h:477)
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c:496: warning:
‘pci_find_device’ is deprecated (declared at include/linux/pci.h:477)
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c: In function
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c:1073: warning
: implicit declaration of function ‘pm_register’
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c:1073: warning
: assignment makes pointer from integer without a cast
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c:1170: warning
: implicit declaration of function ‘pm_unregister’
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c:1283:5: warni
ng: "NV_ENABLE_MEM_TRACKING" is not defined
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c: In function
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c:1480: warning
: ‘deprecated_irq_flag’ is deprecated (declared at include/linux/interru
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c:1480: warning
: ‘deprecated_irq_flag’ is deprecated (declared at include/linux/interru
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c:1481: warning
: passing argument 2 of ‘request_irq’ from incompatible pointer type
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c: In function
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c:1711: warning
: implicit declaration of function ‘remap_page_range’
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c: In function
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c:3449: warning
: assignment makes pointer from integer without a cast
/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c:3455: warning
: assignment makes pointer from integer without a cast
make[3]: *** [/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.o
] Error 1
make[2]: *** [_module_/tmp/selfgz5266/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src
/nv] Error 2
nvidia.ko failed to build!
make[1]: *** [module] Error 1
make: *** [module] Error 2
-> Error.
ERROR: Unable to build the NVIDIA kernel module.
ERROR: Installation has failed. Please see the file
'/var/log/nvidia-installer.log' for details. You may find suggestions
on fixing installation problems in the README available on the Linux
driver download page at

All times are GMT -5. The time now is 03:20 AM.