LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-08-2019, 01:48 PM   #1
parotta36
Member
 
Registered: Dec 2017
Location: Madurai
Distribution: Linux Mint | Slackware
Posts: 53

Rep: Reputation: Disabled
Kernel headers for Slackware 14.2 - How to install?


I'm using Slackware 14.2 with kernel 4.4.14 in a Virtuabox. When I run Guestadditions, it displays the following error.

How should I install kernel headers in slackware?

I've tried Slackpkg install-new kernel-headers, but it gives some curses like screen with no option relatng to headers.

Code:
bash-4.3# ./VBoxLinuxAdditions.run  Verifying archive integrity... All good. 
Uncompressing VirtualBox 5.2.18 Guest Additions for Linux........ 
VirtualBox Guest Additions installer
Removing installed version 5.2.18 of VirtualBox Guest Additions...  
You may need to restart your guest system to finish removing the guest drivers.  
Copying additional installer modules ... 
Installing additional modules ... 
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.  This may take a while. 
This system is currently not set up to build kernel modules. 
Please install the Linux kernel "header" files matching the current kernel 
for adding new hardware support to the system. VirtualBox Guest Additions: Starting. 
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.  This may take a while. 

This system is currently not set up to build kernel modules. 

 Please install the Linux kernel "header" files matching the current kernel for adding new hardware support to the system.
How am I supposed to install packages/browse available packages in Slackware?
 
Old 02-08-2019, 02:30 PM   #2
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 904

Rep: Reputation: 468Reputation: 468Reputation: 468Reputation: 468Reputation: 468
Slackware doesn't provide you with a stripped down kernel source tree containing only the headers. See this post for reference:
https://www.linuxquestions.org/quest...0/#post5949665

You'll need to install the full kernel source and depending on the kernel you use, get the package from the mirrors and use installpkg on it:
- default 4.4.14:
https://mirror.de.leaseweb.net/slack...2/slackware/k/
- latest 4.4.172:
https://mirror.de.leaseweb.net/slack...linux-4.4.172/

If you have slackpkg configured, you can install them by using:
Code:
slackpkg install kernel-source
 
Old 02-08-2019, 07:40 PM   #3
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 1,068

Rep: Reputation: 322Reputation: 322Reputation: 322Reputation: 322
Quote:
Originally Posted by abga View Post
Slackware doesn't provide you with a stripped down kernel source tree containing only the headers. See this post for reference:
https://www.linuxquestions.org/quest...0/#post5949665

You'll need to install the full kernel source and depending on the kernel you use, get the package from the mirrors and use installpkg on it:
- default 4.4.14:
https://mirror.de.leaseweb.net/slack...2/slackware/k/
- latest 4.4.172:
https://mirror.de.leaseweb.net/slack...linux-4.4.172/

If you have slackpkg configured, you can install them by using:
Code:
slackpkg install kernel-source
ERROR

slackware provides kernel-headers package.

https://mirrors.slackware.com/slackw..._smp-x86-1.txt


Quote:
slackpkg update
slackpkg install kernel-headers

Last edited by USUARIONUEVO; 02-08-2019 at 07:41 PM.
 
Old 02-08-2019, 09:15 PM   #4
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 904

Rep: Reputation: 468Reputation: 468Reputation: 468Reputation: 468Reputation: 468
@USUARIONUEVO
If I were you, I would delete your post, correct the "ERROR"
 
Old 02-09-2019, 03:01 AM   #5
parotta36
Member
 
Registered: Dec 2017
Location: Madurai
Distribution: Linux Mint | Slackware
Posts: 53

Original Poster
Rep: Reputation: Disabled
Thanks @abga!!! It worked!

I ran the install-packages file, not installpkg.


This is the output for both,

Code:
slackpkg install kernel-source
slackpkg install kernel-headers
Output:
Code:
Looking for kernel-headers in package list. Please wait... DONE.

No packages match the pattern for install.
 
Old 02-09-2019, 07:55 AM   #6
ehartman
Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 374

Rep: Reputation: 166Reputation: 166
Quote:
Originally Posted by parotta36 View Post
Output:
Code:
Looking for kernel-headers in package list. Please wait... DONE.

No packages match the pattern for install.
Then you're pointing to the wrong packages sources.
The standard 14.2 release has:
Code:
d/kernel-headers-4.4.14_smp-x86-1.txz
k/kernel-source-4.4.14_smp-noarch-1.txz

and in the update tree there is a directory
patches/packages/linux-4.4.172   with all kernel updates (for version 4.4.172)
Install the source for the version of the kernel you're running, the -headers one doesn't make too much difference (but the 4.4.14 one is the version, used to compile the C library, so the system calls are using that version).

Last edited by ehartman; 02-09-2019 at 07:56 AM.
 
Old 02-09-2019, 08:24 AM   #7
parotta36
Member
 
Registered: Dec 2017
Location: Madurai
Distribution: Linux Mint | Slackware
Posts: 53

Original Poster
Rep: Reputation: Disabled
So, I should've run "slackpkg install kernel-headers-4.4.14_smp-x86-1" after downloading everything from /k/ ?
 
Old 02-09-2019, 08:56 AM   #8
rkfb
Member
 
Registered: Oct 2003
Location: Guildford, England
Distribution: Slackware64 current running TWM
Posts: 453

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by parotta36 View Post
So, I should've run "slackpkg install kernel-headers-4.4.14_smp-x86-1" after downloading everything from /k/ ?
You can find the headers in d/
 
Old 02-09-2019, 11:04 AM   #9
ehartman
Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 374

Rep: Reputation: 166Reputation: 166
Quote:
Originally Posted by parotta36 View Post
So, I should've run "slackpkg install kernel-headers-4.4.14_smp-x86-1" after downloading everything from /k/ ?
I must admit I never used slackpkg.
I've got a local mirror of all packages I may need and just use installpkg or upgradepkg on the files, stored inside that mirror. So i.e.
Code:
cd <base directory of my mirror>
installpkg d/kernel-headers-4.4.14-x86-1.txz
installpkg k/kernel-source-4.4.14-noarch-1.txz
for the original, as-released, packages or
Code:
upgradepkg patches/packages/linux-4.4.172/kernel-headers-4.4.172-x86-1.txz
upgradepkg patches/packages/linux-4.4.172/kernel-source-4.4.172-noarch-1.txz
to upgrade those to the newest released version.
 
Old 02-09-2019, 03:17 PM   #10
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 904

Rep: Reputation: 468Reputation: 468Reputation: 468Reputation: 468Reputation: 468
Quote:
Originally Posted by parotta36 View Post
So, I should've run "slackpkg install kernel-headers-4.4.14_smp-x86-1" after downloading everything from /k/ ?
You might well have them already installed, normally they are there after a Slackware installation, check with:
Code:
ls -al /var/log/packages/kernel-headers*
Needless to say, it's recommended to always perform a full installation of Slackware!

The VirtualBox error message from you first post was referring to building kernel modules and for that it needs the kernel source files. The kernel source tree headers only should suffice, but as I previously stated, Slackware doesn't provide you with such a package. The kernel headers Slackware provides are the collection provided by the kernel to be used by the toolchain (compiler), and that's where the original term "kernel headers" comes from:
https://www.kernel.org/doc/Documenta...rs_install.txt

Some new Linux distributions considered to "corrupt" the term kernel headers and use it to define a stripped down kernel source tree containing only the headers and this is where the confusion comes from.

To properly configure slackpkg, read this:
https://docs.slackware.com/slackware:slackpkg

Amd if you want to reinstall the kernel headers, just for fun:
Code:
slackpkg reinstall kernel-headers
 
Old 02-09-2019, 04:03 PM   #11
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 1,068

Rep: Reputation: 322Reputation: 322Reputation: 322Reputation: 322
Quote:
Originally Posted by abga View Post
@USUARIONUEVO
If I were you, I would delete your post, correct the "ERROR"
why ?

you say , "slackware no provide packages with only headers" , and this is an BIG ERROR , my friend , because slackware since ,.. EVER? , provide kernel-headers packages , OTHER THING , is you need THE SOURCE KERNEL , because you go to recompile with extra options enabled on kernel or disabled (custom kernels).
 
Old 02-09-2019, 04:40 PM   #12
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 904

Rep: Reputation: 468Reputation: 468Reputation: 468Reputation: 468Reputation: 468
Quote:
Originally Posted by USUARIONUEVO View Post
why ?

you say , "slackware no provide packages with only headers" , and this is an BIG ERROR , my friend , because slackware since ,.. EVER? , provide kernel-headers packages ,
By looking at your English grammar I believe now that you don't really master the language and it might be that you didn't really understand what I was writing in my posts #2 & #10. Please read them again, maybe use google translate to help you with your native language.
And I wrote (post #2)- "Slackware doesn't provide you with a stripped down kernel source tree containing only the headers"
In post #10 again: "The kernel source tree headers only should suffice, but as I previously stated, Slackware doesn't provide you with such a package."

Quote:
Originally Posted by USUARIONUEVO View Post
OTHER THING , is you need THE SOURCE KERNEL , because you go to recompile with extra options enabled on kernel or disabled (custom kernels).
In post #10 I wrote: "The VirtualBox error message from you first post was referring to building kernel modules and for that it needs the kernel source files."
Never mentioned rebuilding the whole kernel. For building out of the tree (or external) modules (drivers), the headers from the kernel source tree that was used for building the currently running kernel, together with the Module.symvers (contains all exported symbols from the kernel and compiled modules) and maybe the kernel configuration file (.config) are usually sufficient. This stripped version of the kernel source tree, where the "useless" source files have been removed is what Slackware doesn't provide. This is also what other distributions are calling "kernel headers" package and where the confusion starts.
 
Old 02-09-2019, 04:53 PM   #13
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 1,068

Rep: Reputation: 322Reputation: 322Reputation: 322Reputation: 322
Im not explain nothing to you ..

But , man .... ha ha ha ha

https://mirrors.slackware.com/slackw...9.20-x86-1.txt

Quote:
kernel-headers: kernel-headers (Linux kernel include files)
kernel-headers:
kernel-headers: These are the include files from the Linux kernel.
kernel-headers:
kernel-headers: You'll need these to compile most system software for Linux.
kernel-headers:
kernel-headers:
kernel-headers:
kernel-headers:
kernel-headers:
kernel-headers:

BUT , hey ... okey , slackware NO PROVIDE PACKAGES WITH ONLY HEADERS , ok ok man ok.

Im not replay more.

If you say , all believe on you :=)

When system go compiling extra modules , need /usr/src/linux AND OF COURSE , the non exisitng package "kernel-headers" :=)
 
Old 02-09-2019, 05:23 PM   #14
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 904

Rep: Reputation: 468Reputation: 468Reputation: 468Reputation: 468Reputation: 468
You don't need to reply to me, actually I'm sad you couldn't follow what I was explaining, more useful for both of us would be for you to RTFM:
https://www.kernel.org/doc/Documenta...rs_install.txt
https://www.kernel.org/doc/Documenta...ld/modules.txt
"To build external modules, you must have a prebuilt kernel available
that contains the configuration and header files used in the build."

As for the OP, parotta36, it looks like he resolved his reported problem in post #5
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[kernel-headers-3.2.45-x86-3] OR [kernel-headers-3.2.45_smp-x86-3]? Sefid par Slackware 3 07-24-2013 10:59 AM
Why Does Linux Headers Keep Including Too Many Headers? minivy Linux - Kernel 2 12-07-2011 03:16 PM
Confused: Which headers are "The Headers"? Couling Linux - Software 4 06-15-2010 02:29 PM
Zypper wants to dl the wrong kernel headers... YaST doesnt have current headers zorb SUSE / openSUSE 2 11-28-2009 12:12 PM
Difference between packages linux-headers-foo and linux-headers-foo-generic? jhwilliams Ubuntu 1 10-19-2009 06:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration