# error while installing nvidia drivers



## lorenzo (Jul 4, 2011)

Hi,
I tried to install the latest nvidia driver in this way:

```
# portsnap fetch update
# cd /usr/ports/x11/nvidia-drivers
# make config
# make install clean
```
But I received this output (after make install):

```
===> Building for nvidia-driver-256.53
===> src (all)
"/usr/share/mk/bsd.kmod.mk", line 12: "can't find kernel source tree"
*** Error code 1

Stop in /usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBSD-x86_64-256.53
*** Error code 1

Stop in /usr/ports/x11/nvidia-driver
*** Error code 1

Stop in /usr/ports/x11/nvidia-driver
```
How can I solve this issue?


----------



## thuglife (Jul 4, 2011)

`# pkg_add -r nvidia-driver`

Or install the source from your installation media using sysinstall, type:
`# sysinstall`

and then select src -> All from Configure | Distributions.


----------



## lorenzo (Jul 4, 2011)

```
pkg_add: unable to fetch [filename] by url.
```
Strange.


----------



## SirDice (Jul 5, 2011)

There is no package for the nvidia-driver.

To be able to build the port the FreeBSD sources must be available in /usr/src/.


----------



## thuglife (Jul 5, 2011)

SirDice said:
			
		

> There is no package for the nvidia-driver.



There is, http://pointyhat.freebsd.org/errorlogs/amd64-8-packages-latest/x11/nvidia-driver-270.41.19.tbz, maybe he is on release?


----------



## SirDice (Jul 5, 2011)

I see it changed recently:


> - Remove NO_PACKAGE; along with previous change, this enables us to build nvidia-driver packages


http://www.freebsd.org/cgi/cvsweb.cgi/ports/x11/nvidia-driver/Makefile


----------

