[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: I have no /usr/src/linux/ sources

Hi Eric

Sorry for the late answer. But I don't have the time to check the
messages on debian-user more often.

On Sat, 2004-09-18 at 15:03, Eric Dickner wrote:
> I am trying to compile some <foo>.src.rpm files.  When
> I try to do this they look for headers under the
> /usr/src/linux link. I installed linux from CD's
> originally and they didn't put anything there...I
> don't even have that link.
> I downloaded a source kernel from kernel.org and many
> of the instructions I found told me to put the source
> there...BUT the readme from kernel.org specifically
> told me NOT to put it there.  

Great to hear that! It's NOT necessary to have /usr/src/linux, as far as
I can see: You can compile your .deb packages (probably all .deb
packages) somewhere in your user directory, with any need to cd to

I don't have any idea how to get rpm packages compiled on a Debian
system. But others might be able to help here ...
(maybe you can forget the rpm's by simply finding the deb. package
pendant, and then try to compile/install this?)

Even Linus Torvalds suggested some time ago that people should NOT use
/usr/src for compiling kernels:


I would suggest that people who compile new kernels should:

      * NOT do so in /usr/src. Leave whatever kernel (probably only the
        header files) that the distribution came with there, but don't
        touch it.
      * compile the kernel in their own home directory, as their very
        own selves. No need to be root to compile the kernel. You need
        to be root to install the kernel, but that's different.
      * not have a single symbolic link in sight (except the one that
        the kernel build itself sets up, namely the "linux/include/asm"
        symlink that is only used for the internal kernel compile

I tried to describe in (more or less) detail a kernel compile in a
NON-/usr/src/ environment. You find it here:

It should also work for any other .deb package you'd like to compile.

If you want to compile a package simply do a 
apt-get build-dep <some-deb-package>

The command above will pull dependency related packages, necessary for
the build, into your system. More on that here:

> They said something
> about how the source from the "kernel du jour" was not
> what was supposed to be there.  Of course, I threw out
> all those instructions on recompiling kernels and
> followed the readme from those folks.
> As a result I still have nothing there except the RPM
> directories.  Any effort to"make" the .rps results in
> them looking for these headers.

                       [ ... ]

Did you ever install a kernel from a deb package? If not: Perhaps this
is the reason you don't have these "headers" on your system ... ??
Any one out there knows more on that?

And Eric: Please let me know if this does not help ..

Good luck
Profile: http://profiles.yahoo.com/wolfgangpfeiffer

3 more reasons for Linux:

Reply to: