Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was trying to compile the nvidia (proprietary) drivers yesterday (there is some old version in Debian testing, 173.something I believe), but it failed miserably. Anyone managed to fix the problem? How can I configure apt to get all the relevant packages from unstable (but only these packages)?

EDIT: the build output:

unpack                        
Extracting the package tarball, /usr/src/nvidia-kernel.tar.bz2, please wait...
"/usr/share/modass/packages/nvidia-kernel-source" build KVERS=2.6.32-trunk-686 KSRC=/lib/modules/2.6.32-trunk-686/build KDREV=2.6.32-5 kdist_image
/usr/bin/make  -f debian/rules clean                                                                                                              
make[1]: Entering directory `/usr/src/modules/nvidia-kernel'                                                                                      
# select which makefile to use.                                                                                                                   
rm -f /usr/src/modules/nvidia-kernel/Makefile || true                                                                                             
if [ 6 = 6  ]; then \                                                                                                                             
             ln -s Makefile.kbuild Makefile ; \                                                                                                   
        fi                                                                                                                                        
if [  6 = 4  ]; then \                                                                                                                            
             ln -s Makefile.nvidia Makefile ; \                                                                                                   
        fi                                                                                                                                        
if [ -e patch-stamp ]; then \                                                                                                                     
           dpatch deapply-all ; \                                                                                                                 
           rm -rf patch-stamp debian/patched ; \                                                                                                  
        fi                                                                                                                                        
if [ -f /usr/src/modules/nvidia-kernel/debian/control.template ]; then \                                                                          
                cp  /usr/src/modules/nvidia-kernel/debian/control.template /usr/src/modules/nvidia-kernel/debian/control; \                       
        fi                                                                                                                                        
dh_testroot                                                                                                                                       
rm -f build-stamp configure-stamp                                                                                                                 
/usr/bin/make clean SYSSRC=/lib/modules/2.6.32-trunk-686/build -C /usr/src/modules/nvidia-kernel/ -f Makefile                                     
make[2]: Entering directory `/usr/src/modules/nvidia-kernel'                                                                                      
make[2]: Leaving directory `/usr/src/modules/nvidia-kernel'                                                                                       
rm -f /usr/src/modules/nvidia-kernel//Makefile
share|improve this question
1  
what problem? can you add what command failed and what errors were output? – quack quixote Jan 29 '10 at 16:50

if you can use Synaptic all you'll have to do (after you've added the unstable repositories and after a apt-get update) is to open Synaptic, search for the nvidia packages you want to upgrade, right click on it and go to the "preferencies": there you'll find a version tab, where you can "force version".

Anyway, you can do it, but if you want ONLY that packages (and dependencies...that is a must) then remember to "comment" your unstable repos after the upgrade, or you'll have to face a total unstable upgrade when you apt-get update && apt-get upgrade!

Hope that helps,

Regards

share|improve this answer
    
"comment" your unstable repos? I kind of recall that you can set priorities for repos, I just can't remember where :( – Grzenio Jan 29 '10 at 16:47
    
When you finish the unstable nvidia driver installation process, just open the "/etc/apt/sources.list" and add a # (that is the comment sign) before your unneeded repos (for instance, your unstable repos). – dag729 Jan 29 '10 at 16:54
up vote 0 down vote accepted

I found it!

You have to change (create) the /etc/apt/preferences file, in my case:

Package: *
Pin: release a=testing
Pin-Priority: 700

Package: *
Pin: release a=stable
Pin-Priority: 600

Package: *
Pin: release a=unstable
Pin-Priority: 50

Package: nvidia-glx nvidia-kernel-source nvidia-xconfig nvidia-settings
Pin: release a=unstable
Pin-Priority: 750

This says that testing versions will have higher priority apart from the nvidia packages listed.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .