Nvidia-340xx installation error: usr/src/linux510: No such file or directory

I’m a new manjaro user and now when I’m trying to install different applications I’m facing this error message quite often. It seems that in order to install some applications I need to update my graphics driver, but when I try to update it, I get that error message. Does someone know how to fix this?

NVIDIA: calling KBUILD...
make[1]: *** /usr/src/linux510: No such file or directory.  Stop.
nvidia.ko failed to build!
make: *** [Makefile:202: nvidia.ko] Error 1
==> ERROR: A failure occurred in build().

Thank you!


Install the headers package for your kernel and try again:

sudo pacman -S linux510-headers

Did that but I’m still getting the same error. I also noticed that in the beginning of the build it says.

/var/tmp/pamac-build-pietari/nvidia-340xx/PKGBUILD: line 43: /usr/src/linux510/version: No such file or directory


what is the output of mhwd-kernel -li?

The nvidia-340xx AUR package is designed for Arch kernels, not Manjaro kernels. The 340 series driver is no longer supported by NVIDIA. We have 390 (legacy), 470 (production) and 495 / 510 (new feature).

See Configure Graphics Cards - Manjaro

Please post your system info as outlined here:

It is still possible to install 340 on Manjaro though. Check this thread (but there are others too) to have some insights (from this linked post to the end, read it all before):

But if your card is compatible with 390 driver, or superior, install the latest compatible driver.

mhwd-kernel -li:

5.10.93-1-MANJARO (linux510)
The following kernels are installed in your system:
   * linux510


  Kernel: 5.10.93-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64
    root=UUID=873f89cd-7c31-4fa3-aa71-670e97f56232 rw quiet apparmor=1
    security=apparmor udev.log_priority=3
  Desktop: KDE Plasma 5.23.5 tk: Qt 5.15.2 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
  Type: Laptop System: Apple product: MacBook5,1 v: 1.0
    serial: <superuser required> Chassis: type: 10 v: Mac-F42D89C8
    serial: <superuser required>
  Mobo: Apple model: Mac-F42D89C8 v: Proto serial: <superuser required>
    UEFI: Apple v: MB51.88Z.007D.B03.0904271443 date: 04/27/09
  ID-1: BAT0 charge: 9.1 Wh (98.9%) condition: 9.2/44.7 Wh (20.6%) volts: 12.3
    min: 10.9 model: SMP bq20z951 type: Li-ion serial: N/A status: Full
    cycles: 488
  RAM: total: 7.52 GiB used: 1.69 GiB (22.4%)
  RAM Report:
    permissions: Unable to run dmidecode. Root privileges required.
  Info: model: Intel Core2 Duo P7350 bits: 64 type: MCP arch: Core Penryn
    family: 6 model-id: 0x17 (23) stepping: 0xA (10) microcode: 0xA0B
  Topology: cpus: 1x cores: 2 smt: <unsupported> cache: L1: 128 KiB
    desc: d-2x32 KiB; i-2x32 KiB L2: 3 MiB desc: 1x3 MiB
  Speed (MHz): avg: 1592 min/max: 1596/1995 scaling: driver: acpi-cpufreq
    governor: schedutil cores: 1: 1592 2: 1592 bogomips: 7963
  Flags: acpi aperfmperf apic arch_perfmon bts clflush cmov constant_tsc
    cpuid cx16 cx8 de ds_cpl dtes64 dtherm dts est flexpriority fpu fxsr ht
    lahf_lm lm mca mce mmx monitor msr mtrr nopl nx pae pat pbe pdcm pebs pge
    pni pse pse36 pti rep_good sep sse sse2 sse4_1 ssse3 syscall tm tm2
    tpr_shadow tsc vme vmx vnmi vpid xsave xtpr
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: EPT disabled
  Type: mds
    status: Vulnerable: Clear CPU buffers attempted, no microcode; SMT disabled
  Type: meltdown mitigation: PTI
  Type: spec_store_bypass status: Vulnerable
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2
    mitigation: Full generic retpoline, STIBP: disabled, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
  Device-1: NVIDIA C79 [GeForce 9400M] vendor: Apple MacBook5 1 driver: nvidia
    v: 340.108 alternate: nouveau bus-ID: 02:00.0 chip-ID: 10de:0863
    class-ID: 0300
  Device-2: Apple Built-in iSight type: USB driver: uvcvideo bus-ID: 1-4:3
    chip-ID: 05ac:8507 class-ID: 0e02 serial: <filter>
  Display: x11 server: X.org compositor: kwin_x11 driver:
    loaded: nvidia resolution: <missing: xdpyinfo>
  Message: Unable to show advanced data. Required tool glxinfo missing.
  Device-1: NVIDIA MCP79 High Definition Audio driver: snd_hda_intel v: kernel
    bus-ID: 00:08.0 chip-ID: 10de:0ac0 class-ID: 0403
  Sound Server-1: ALSA v: k5.10.93-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.20 running: no
  Sound Server-3: PulseAudio v: 15.0 running: yes
  Sound Server-4: PipeWire v: 0.3.43 running: yes
  Device-1: NVIDIA MCP79 Ethernet driver: forcedeth v: kernel port: 21e0
    bus-ID: 00:0a.0 chip-ID: 10de:0ab0 class-ID: 0200
  IF: enp0s10 state: down mac: <filter>
  Device-2: Broadcom BCM4322 802.11a/b/g/n Wireless LAN
    vendor: Apple AirPort Extreme driver: wl v: kernel modules: ssb
    bus-ID: 03:00.0 chip-ID: 14e4:432b class-ID: 0280
  IF: wls3 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: dynamic noprefixroute scope: global
  IP v6: <filter> type: noprefixroute scope: link
  WAN IP: <filter>
  Device-1: Apple Bluetooth Host Controller type: USB driver: btusb v: 0.8
    bus-ID: 4-1.1:3 chip-ID: 05ac:8213 class-ID: fe01 serial: <filter>
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
  Message: No logical block device data found.
  Message: No RAID data found.
  Local Storage: total: 238.47 GiB used: 35.05 GiB (14.7%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: A-Data model: SP600 size: 238.47 GiB
    block-size: physical: 512 B logical: 512 B speed: 3.0 Gb/s type: SSD
    serial: <filter> rev: 5.2 scheme: GPT
  Optical-1: /dev/sr0 vendor: HL-DT-ST model: DVDRW GS21N rev: SA18
    dev-links: cdrom
  Features: speed: 24 multisession: yes audio: yes dvd: yes
    rw: cd-r,cd-rw,dvd-r state: running
  ID-1: / raw-size: 238.17 GiB size: 233.38 GiB (97.99%)
    used: 35.05 GiB (15.0%) fs: ext4 dev: /dev/sda2 maj-min: 8:2 label: N/A
    uuid: 873f89cd-7c31-4fa3-aa71-670e97f56232
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 288 KiB (0.1%) fs: vfat dev: /dev/sda1 maj-min: 8:1 label: NO_LABEL
    uuid: 09B1-A016
  Alert: No swap data was found.
  Message: No unmounted partitions found.
  Hub-1: 1-0:1 info: Full speed or root hub ports: 7 rev: 2.0 speed: 480 Mb/s
    chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 1-4:3 info: Apple Built-in iSight type: Video driver: uvcvideo
    interfaces: 3 rev: 2.0 speed: 480 Mb/s power: 500mA chip-ID: 05ac:8507
    class-ID: 0e02 serial: <filter>
  Hub-2: 2-0:1 info: Full speed or root hub ports: 5 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-3: 3-0:1 info: Full speed or root hub ports: 7 rev: 1.1 speed: 12 Mb/s
    chip-ID: 1d6b:0001 class-ID: 0900
  Device-1: 3-1:2 info: Logitech M105 Optical Mouse type: Mouse
    driver: hid-generic,usbhid interfaces: 1 rev: 2.0 speed: 1.5 Mb/s
    power: 100mA chip-ID: 046d:c077 class-ID: 0301
  Device-2: 3-5:3 info: Apple Built-in IR Receiver type: HID
    driver: appleir,usbhid interfaces: 1 rev: 2.0 speed: 1.5 Mb/s power: 100mA
    chip-ID: 05ac:8242 class-ID: 0300
  Device-3: 3-6:4 info: Apple Internal Keyboard/Trackpad (ISO)
    type: Keyboard,HID,Mouse driver: apple,bcm5974,usbhid interfaces: 3 rev: 2.0
    speed: 12 Mb/s power: 40mA chip-ID: 05ac:0237 class-ID: 0301
  Hub-4: 4-0:1 info: Full speed or root hub ports: 5 rev: 1.1 speed: 12 Mb/s
    chip-ID: 1d6b:0001 class-ID: 0900
  Hub-5: 4-1:2
    info: Broadcom BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth) ports: 3
    rev: 2.0 speed: 12 Mb/s chip-ID: 0a5c:4500 class-ID: 0900
  Device-1: 4-1.1:3 info: Apple Bluetooth Host Controller type: Bluetooth
    driver: btusb interfaces: 4 rev: 2.0 speed: 12 Mb/s chip-ID: 05ac:8213
    class-ID: fe01 serial: <filter>
  System Temperatures: cpu: 72.0 C mobo: N/A gpu: nvidia temp: 72 C
  Fan Speeds (RPM): N/A
  Processes: 163 Uptime: 1h 15m wakeups: 2 Init: systemd v: 250
  tool: systemctl Compilers: gcc: 11.1.0 clang: 13.0.0 Packages: pacman: 1396
  lib: 375 flatpak: 0 Shell: Zsh v: 5.8 default: Bash v: 5.1.16
  running-in: konsole inxi: 3.3.12


Ho wait… it’s you.

So what’s going on? You installed it and ask how to install it again?

//EDIT: or maybe you have issue because it tries to update from the AUR the packages I had you install (not from the AUR)? If this is the case you need to add to ignore list in Pamac the packages you installed from the other thread. In Pamac, open the Preferences, Go to the Advanced tab, scroll to bottom, and add the Nvidia packages you installed in the ignore list (you can search for nvidia it should list all of them), I guess.

Yes, it’s me :smiley: I’m currently running nvidia 340.108 -1 and I’m offered to update to

There wouldn’t be a problem since everything is working well, but when I’m trying to install certain packages, eg. libre office or firewall, it also requires to make that driver update and the installation ends up in the same error.


Then check what I wrote above, and add Nvidia packages to ignore list in Pamac.

Thank you! That solved the problem!


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.