Missing "version.h" when installing fglrx

30,604

Solution 1

Install the kernel-headers package and try again. If it doesn't work, try

cp -v /usr/include/linux/version.h /lib/modules/$(uname -r)/build/include/linux

Solution 2

I had the same problem installing newer AMD drivers on ubuntu/willy:

fglrx installation requires that the system has kernel headers. /lib/modules/4.2.0-42-generic/build/include/linux/version.h cannot be found on this system. Install kernel headers using the command apt-get install linux-headers-4.2.0-42-generic.

Answers with cp and ln are good but first you have to do is find suitable version.h header on your system. For example using (on debian/ubuntu):

apt-file search version.h |  grep $(uname -r)
...
linux-headers-4.2.0-42-generic: /usr/src/linux-headers-4.2.0-42-generic/include/generated/uapi/linux/version.h

Only now you can be sure that you copy or link a good file to place where AMD wishes. In my case:

cp -v /usr/src/linux-headers-4.2.0-42-generic/include/generated/uapi/linux/version.h /lib/modules/4.2.0-42-generic/build/include/linux
Share:
30,604

Related videos on Youtube

jcora
Author by

jcora

flowing.systems

Updated on September 18, 2022

Comments

  • jcora
    jcora over 1 year

    I have downloaded the fglrx driver installer from the ATI drivers page.

    when I start the installation, everything goes smoothly until I hit an error message, telling me to check /usr/share/ati/fglrx-install.log.

    The contents of that file are as follows:

    Check if system has the tools required for installation. fglrx installation requires that the system have kernel headers. /lib/modules/3.8.11-200.fc18.x86_64/build/include/linux/version.h cannot be found on this system. One or more tools required for installation cannot be found on the system. Install the required tools before installing the fglrx driver. Optionally, run the installer with --force option to install without the tools. Forcing install will disable AMD hardware acceleration and may make your system unstable. Not recommended.

    Now, after a bit of searching around, I found that the symbolic link called build in /lib/modules/3.8.11-200.fc18.x86_64 points to a nonexistent location.

    I installed the kernel-devel package, and now it had pointed to an existing directory.

    However, in the /lib/modules/3.8.11-200.fc18.x86_64/build/include/linux/ directory, that is populated with various header files - I cannot find the one I need - version.h.

    How can I solve this problem? Should I install the driver in a different manner? Which other package can I install to get the version.h file?

    I'm running a clean install (default) of Fedora 18, which I had updated today.

  • jcora
    jcora about 11 years
    I'm afraid that the file is still not there.
  • schaiba
    schaiba about 11 years
    Edited my answer.
  • naught101
    naught101 over 8 years
    Isn't your link syntax backwards?
  • Krzysiek
    Krzysiek over 8 years
    @naught101 not exactly sure about the order of parameters right now; it's just an easy way to resolve absent headers - while the ln command has four forms of syntax: linux.die.net/man/1/ln
  • G-Man Says 'Reinstate Monica'
    G-Man Says 'Reinstate Monica' over 7 years
    @syslogic: Really? The suggested edit looked right to me.
  • Krzysiek
    Krzysiek over 7 years
    @G-Man read the above explanation (that was also S/s mistaken), while the path might vary in between distributions/versions (the one which I've used matches the one in the answer above). which should be nevertheless no problem, hence the locate command exists. please add your own answer.