Driver Not Upgrading through Pacman

Hi I want help from experts here,

I am having zero knowledge how the things work in Linux actually a beginner user.

A small issue I am facing is that I am having Nvidia 340xx-dkms (340.108.1) installed in my gnome desktop.

The Pacman shows the update as 340.108-13 but when I try to upgrade, it shows the error…
==> Removing existing $pkgdir/ directory…
==> Starting build()…
make[1]: *** /usr/src/linux: No such file or directory. Stop.
nvidia.ko failed to build!
make: *** [Makefile:202: nvidia.ko] Error 1
==> ERROR: A failure occurred in build().

Please Guide me how to update it. is it necessary and how I can do it.

Thanks in advance.

I’m no expert and can’t help you fix your issue. I can point you to this post about the latest update and possible manual actions to take if no expert comes along to help you out.

I have legacy driver install in my pc but not able to update the same driver from Pacman. I am not an expert of using linux. New in this platform. anyway thanks Hanzel.

/usr/src/linux: No such file or directory. Stop.

most likely mean kernel headers are not installed.

Install linux headers with pacman -S linux-headers-$version where $version are all versions you have installed.