Find the answer to your Linux question:
Results 1 to 9 of 9
* Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Could not find a usable .config in the kernel source directory. * Please ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Enthusiast crashandburn0420's Avatar
    Join Date
    Jun 2005
    Location
    Naugatuck, CT
    Posts
    590

    emerge -uvD world error


    * Determining the location of the kernel source code
    * Found kernel source directory:
    * /usr/src/linux
    * Could not find a usable .config in the kernel source directory.
    * Please ensure that /usr/src/linux points to a configured set of Linux sources.
    * If you are using KBUILD_OUTPUT, please set the environment var so that
    * it points to the necessary object directory so that it might find .config.

    !!! ERROR: media-sound/alsa-driver-1.0.11 failed.
    !!! Function linux-info_pkg_setup, Line 537, Exitcode 1
    !!! Unable to calculate Linux Kernel version
    !!! If you need support, post the topmost build error, NOT this status message.

  2. #2
    Linux Engineer spencerf's Avatar
    Join Date
    Jan 2005
    Location
    Syracuse, NY
    Posts
    1,144
    cd /usr/src/
    ls -all


    does it show that that there is a symlink to to a valid kernel

    for example mine shows:

    Code:
    bob@localhost /usr/src $ ls -all
    total 16
    drwxr-xr-x  3 root root   24 Apr 26 17:33 .
    drwxr-xr-x 15 root root 4096 Apr 27 11:45 ..
    -rw-r--r--  1 root root    0 Feb 14 00:03 .keep
    lrwxrwxrwx  1 root root   22 Apr 26 17:33 linux -> linux-2.6.16-gentoo-r4
    drwxr-xr-x 20 root root 4096 Apr 27 08:33 linux-2.6.16-gentoo-r4
    bob@localhost /usr/src $
    if the symlink isn't there then

    Code:
    ln -sfn linux-2.6.16-gentoo-r4 linux
    obviously change the command to match your kernel version

    if the symlink is there then check that you have .config in /usr/src/linux

    if not then try copying it from /usr/src/linux-2.6.16-gentoo-r4
    All right, brain. You don't like me and I don't like you, but let's just do this and I can get back to killing you with beer. All New Users Read This!!! If you have a grub problem please look at GRUB MANUAL

  3. #3
    Linux Enthusiast crashandburn0420's Avatar
    Join Date
    Jun 2005
    Location
    Naugatuck, CT
    Posts
    590
    localhost steven # cd /usr/src/
    localhost src # ls -all
    total 20
    drwxr-xr-x 5 root root 4096 Apr 27 16:58 .
    drwxr-xr-x 16 root root 4096 Dec 3 00:40 ..
    -rw-r--r-- 1 root root 0 Dec 7 08:42 .keep
    lrwxrwxrwx 1 root root 22 Apr 27 16:58 linux -> linux-2.6.16-gentoo-r3
    drwxr-xr-x 19 root root 4096 Mar 2 11:46 linux-2.6.14-gentoo-r2
    drwxr-xr-x 20 root root 4096 Apr 22 02:08 linux-2.6.15-gentoo-r1
    drwxr-xr-x 19 root root 4096 Apr 27 16:58 linux-2.6.16-gentoo-r3

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer spencerf's Avatar
    Join Date
    Jan 2005
    Location
    Syracuse, NY
    Posts
    1,144
    what does uname -a tell us. I believe you updated your kernel with the USE=symlink flag and may not have compiled your newly installed kernel and then rebooted and old kernel comes up but sources point to new uncompiled kernel.
    All right, brain. You don't like me and I don't like you, but let's just do this and I can get back to killing you with beer. All New Users Read This!!! If you have a grub problem please look at GRUB MANUAL

  6. #5
    Linux Enthusiast crashandburn0420's Avatar
    Join Date
    Jun 2005
    Location
    Naugatuck, CT
    Posts
    590
    localhost steven # uname -a
    Linux localhost 2.6.14-gentoo-r2 #1 SMP PREEMPT Wed Dec 7 20:30:58 EST 2005 i686 Intel(R) Celeron(R) CPU 2.93GHz GNU/Linux

  7. #6
    Linux Engineer spencerf's Avatar
    Join Date
    Jan 2005
    Location
    Syracuse, NY
    Posts
    1,144
    well as you can see that is the problem you have two possible solutions:

    1) get your linux symlink to point towards your active kernel

    ln -sfn linux-2.6.14-gentoo-r2


    2) or compile your new kernel.
    cd /usr/src/linux
    make menuconfig
    make && make modules_install && make install
    reboot
    All right, brain. You don't like me and I don't like you, but let's just do this and I can get back to killing you with beer. All New Users Read This!!! If you have a grub problem please look at GRUB MANUAL

  8. #7
    Linux Engineer d38dm8nw81k1ng's Avatar
    Join Date
    Mar 2005
    Location
    Newcastle
    Posts
    793

    don't forget

    Quote Originally Posted by spencerf
    well as you can see that is the problem you have two possible solutions:

    1) get your linux symlink to point towards your active kernel

    ln -sfn linux-2.6.14-gentoo-r2


    2) or compile your new kernel.
    cd /usr/src/linux
    make menuconfig
    make && make modules_install && make install
    reboot
    if you're compiling your new kernel, copy your .config file from your old kernel:

    [code]cd /usr/src
    rm linux
    ln -s linux-2.6.16-gentoo-r3 linux
    cp linux-2.6.14-gentoo-r2/.config linux/.config
    cd linux
    make && make modules_install
    cp arch/i386/boot/bzImage /boot/kernel-2.6.16-gentoo-r3[/copy]
    then amend grub accordingly
    sorry if that was a little patronising, i'm in that sort of mood
    Here's why Linux is easier than Windows:
    Package Managers! Apt-Get and Portage (among others) allow users to install programs MUCH easier than Windows can.
    Hardware Drivers. In SuSE, ALL the hardware is detected and installed automatically! How is this harder than Windows' constant disc changing and rebooting?

  9. #8
    Linux Enthusiast crashandburn0420's Avatar
    Join Date
    Jun 2005
    Location
    Naugatuck, CT
    Posts
    590
    Quote Originally Posted by spencerf
    well as you can see that is the problem you have two possible solutions:

    1) get your linux symlink to point towards your active kernel

    ln -sfn linux-2.6.14-gentoo-r2


    2) or compile your new kernel.
    cd /usr/src/linux
    make menuconfig
    make && make modules_install && make install
    reboot
    thank you that worked

  10. #9
    Linux Engineer spencerf's Avatar
    Join Date
    Jan 2005
    Location
    Syracuse, NY
    Posts
    1,144
    no problem and if you want to avoid automatic symlinking of your kernel upon updates in the future just add -symlink to your USE in make.conf
    All right, brain. You don't like me and I don't like you, but let's just do this and I can get back to killing you with beer. All New Users Read This!!! If you have a grub problem please look at GRUB MANUAL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •