# Issues with Nvidia on a fresh 10.3 install



## STREBLO (Apr 10, 2016)

I just installed a fresh 10.3 and attempted to install my graphics driver with
`pkg install nvidia-driver`

I got this in response:


```
[64/65] Installing linux_base-c6-6.7_1...
sysctl: unknown oid 'compat.linux.osrelease'
linuxulator is not (kld)loaded, exiting
pkg: PRE-INSTALL script failed
[64/65] Extracting linux_base-c6-6.7_1: 100%

+++ Some programs may need linprocfs, please add it to /etc/fstab! +++

Running linux ldconfig...
ELF binary type "3" not known.
/compat/linux/sbin/ldconfig: Exec format error
[65/65] Installing nvidia-driver-346.96...
[65/65] Extracting nvidia-driver-346.96: 100%
ELF binary type "3" not known.
/compat/linux/sbin/ldconfig: Exec format error
```

Why am I getting these errors on a fresh install? Should I have done something before installing the driver?


----------



## zirias@ (Apr 10, 2016)

Well, I don't use nvidia so I wonder if this is correct, it really needs the linux compatibility layer? Given this is correct, the output is pretty clear, you're at least missing a `kldload linux`. See Configuring Linux® Binary Compatibility.


----------



## STREBLO (Apr 10, 2016)

Yea I saw that but I didn't think it was correct because I didn't think I needed the Linux compatibility layer to install an Nvidia driver. Shouldn't it have installed the Linux compatibility layer if it needed it anyway? I couldn't find anywhere where it said you had to do that before installing the driver as well. So should I uninstall it, install the compatibility layer, and reinstall it? I have fairly current nvidia driver.


----------



## zspider (Apr 10, 2016)

The Nvidia driver has a dependency on Linux by default. That's most likely the reason that the Linuxulator needs to be installed and running.

This can be toggled in the make config.


----------



## STREBLO (Apr 10, 2016)

zspider said:


> The Nvidia driver has a dependency on Linux by default. That's most likely the reason that the Linuxulator needs to be installed and running.
> 
> This can be toggled in the make config.


In that case, should I uninstall it, install linux compat, then reinstall it? Also, If it's a dependency shouldn't pkg be installing it itself?


----------



## zirias@ (Apr 10, 2016)

STREBLO said:


> In that case, should I uninstall it, install linux compat, then reinstall it?


Yes, exactly. That is, if you don't want to compile it yourself without Linux support.



STREBLO said:


> Also, If it's a dependency shouldn't pkg be installing it itself?


From your log, that's exactly what pkg _tries_ to do! But it can't because the kernel module isn't loaded. pkg will not attempt to automatically change the configuration of your running OS/kernel.


----------



## STREBLO (Apr 10, 2016)

Zirias said:


> Yes, exactly. That is, if you don't want to compile it yourself without Linux support.
> 
> 
> From your log, that's exactly what pkg _tries_ to do! But it can't because the kernel module isn't loaded. pkg will not attempt to automatically change the configuration of your running OS/kernel.


Ahh, I see. Thank you sir.


----------



## SirDice (Apr 11, 2016)

`kldload linux`.

Handbook: 10.2. Configuring Linux® Binary Compatibility


----------

