ERROR: Unable to load the kernel module 'nvidia.o'. This is most likely
because the kernel module was built using the wrong kernel source files
Please make sure you have installed the kernel source files for your
The kernel source files for your running kernel must be available... and it must find the correct files. It may have used the wrong source files. If you have compiled the kernel in that source tree, or cleaned your source tree since compiling it (make clean)... after you compiled the current running kernel then you will have to reconfigure the source tree to match
the running kernel (i.e. place the correct .config file, make oldconfig, and make dep).
If you did not compile the kernel... then you need to install the Slackware kernel sources that were used to compile the kernel. I cannot lead you in doing this, search for guidance on the Slack site or a larger forum such as www.linuxquestions.org
If you are certain you have the correct kernel sources, and they are prepared (config and dep) matching
the kernel you want to build a module for... then you may need to specify the literal directory to use when running the installer.
Use the --kernel-source-path /path/to/source
option. This defaults to /usr/src/linux and in your case probably used /usr/src/linux-2.4.25 (symlinked as /usr/src/linux -> /usr/src/linux-2.4.25).