How to download & install speciifc kernel version header & source from zypper or yast?

I am new to this forum, but i have used opensuse for sometime, just like other distros i would like to download and install specific linux kernal headers and source in opensuse.

The basis of question is i got kernel 4.4.49-16-default, when i running following zypper command

**# zypper install -t pattern devel_C_C++ devel_kernel

**it installs the latest kernal headers and sources, not the one i got installed. I found this out by openning yast and checking kernel_devel pattern and its installed the patterns for the latest kernal 4.4.57-standard.

kindly solve this matter as soon as possible.

Thanks
Muhammad ALi

Kindly reboot your computer and it will activate the newest kernel so the sources and kernel version will match.

thanks for quick reply

if i want to stick with the default kernel, then what will be solution.

and specifically kindly tell me how to download and install specfic kernel headers and sources. pls

thanks
Muhammad Ali

You shouldn’t because the updated kernels contain extremely important security fixes - also the new kernel has already been installed on your system, it simply hasn’t been activated until you reboot.

thanks for the advices about latest kernel is & will be better but this is not the answer to my question, kindly do not take me wrong.

Question: **Just tell me is there any way i can install or download specific kernel & headers from zypper or yast pls?
**
Pls if do not understand the question then do not reply, let others to reply pls.:slight_smile:

thanks for the advices about latest kernel is & will be better but this is not the answer to my question, kindly do not take me wrong.

Question: **Just tell me is there any way i can install or download specific kernel & headers from zypper or yast pls?
**
Pls if do not understand the question then do not reply, let others to reply pls.:slight_smile:

Open Yast—Software, type in the search field “kernel” without qoutes, mark kernel-default-devel, go to the Version Tab and mark your Version.

For Konsole:

zypper in kernel-default-devel-(version)

Replace Version with the Version you want to install and see by typing:

zypper se -s Kernel-default-devel

Thank you very much for the answer, I am trying this out and will share its results soon.

appreciating your response.:slight_smile:

Thanks

Muhammad Ali

yast solution:-

I did the search for kernel in yast, but did not found “kernel-default-devel” package, kindly help in this regard.

zypper solution:-

checked the installed version of kernel through yast and run the following command as instructed.

# zypper in kernel-default-devel-4.4.49-16.1

and yes the zypper installed the respective devel packages. also run the command

# zypper se -s Kernel-default-devel

and yes the respective packages are installed.lol!

At this point my query is closed but just for information.:\

How can i see the packages installed above throught zypper in yast gui?

Since i got kernel-devel packages is there any need for installing pattern devel-kernel? or pattern devel-kernel is some thing different?

Is pattern devel_C_C++ is linked to pattern devel-kernel ?

Thanks Mr Sauerland for the help.
Muhammad Ali

I did the search for kernel in yast, but did not found “kernel-default-devel” package, kindly help in this regard

Its there.

As per my understanding virtual packages are not shown by yast or there may be any option which can show them. Pls help

After installing kernel-devel-4.4.49-16.1 pkg, I executed following cmd and the out put is shown.

**muhammadali-pc:/home/muhammadali # zypper se -s kernel-devel
Loading repository data…
Reading installed packages…

S | Name | Type | Version | Arch | Repository
–±-------------±--------±--------------±-------±------------------------------
v | kernel-devel | package | 4.4.57-18.3.1 | noarch | openSUSE-Leap-42.2_OSS-updates
i | kernel-devel | package | 4.4.49-16.1 | noarch | openSUSE-Leap-42.2_OSS-updates
v | kernel-devel | package | 4.4.46-11.1 | noarch | openSUSE-Leap-42.2_OSS-updates
v | kernel-devel | package | 4.4.36-8.1 | noarch | openSUSE-Leap-42.2_OSS-updates
v | kernel-devel | package | 4.4.36-5.1 | noarch | openSUSE-Leap-42.2_OSS-updates
v | kernel-devel | package | 4.4.27-2.1 | noarch | openSUSE-Leap-42.2_OSS

The kernel-devel-4.4.49-16.1 is shown installed, but the same can not be seen in yast, can any help in this regard?**

Thanks
Muhammad Ali

Did you inspect the version tab on bottom right? Only the latest install is shown in the main list. other version that are available and might be installed show in the version tab

As I wrote:

Open Yast—Software, type in the search field “kernel” without qoutes, mark kernel-default-devel, go to the Version Tab and mark your Version.

Also,
Should be noted that the original Q was for both headers and source, which are packaged separately.

If all you need are the headers, then the posts in this thread are covering that.
And, it should be noted that I’ve found that although the running kernel and development headers should sync up properly so the correct headers are available to you, that sometimes doesn’t happen as it should. To ensure that kernel and its headers versions are sync-d up properly, execute a system update as follows

zypper up

Additionally, if you need the full source, then you need to search for that specific package and install… AFAIK there is no automatic sync for installing the proper source, you need to manually specify.

TSU

As instructed, I checked the yast and searched “kernel-devel”, Yast did not show up already installed package kernel-devel package,but zypper did show that package.

I did a little search and found the option in yast which shows the devel-packages.If the check box is marked yast will show devel-kernel packages. refer following.

Go to Yast->Options->show -devel packages (F7), and yes i got the solution to my problem.rotfl!

You where right Sauerland, thanks man for the valuable information.Thanks all forum members for helping me on my problems.lol!