Hi,
I've just installed CentOS 4.2 I must recompile the kernel and for that i used to do a "yum install kernel-sourcecode".
Now, it doesn't works anymore.
In /usr/src/kernels/... compiling gives an error straight from the start.
Where is now kernel's source code ?
Warm Regards, Mário Gamito
Mário Gamito wrote:
I've just installed CentOS 4.2 I must recompile the kernel and for that i used to do a "yum install kernel-sourcecode".
Now, it doesn't works anymore.
In /usr/src/kernels/... compiling gives an error straight from the start.
Where is now kernel's source code ?
short answer : "yum install kernel-devel", if that does not work get the .src.rpm for the kernel version and manually install that.
- K
Hi,
No, that's not that. You're mistaken.
Until 4.1, there was a kernel-sourcecode-2.6.9 RPM. Now in there isn't.
So, again, where is the kernel's sourcecode ?
Warm Regards, Mário Gamito
Karanbir Singh wrote:
Mário Gamito wrote:
I've just installed CentOS 4.2 I must recompile the kernel and for that i used to do a "yum install kernel-sourcecode".
Now, it doesn't works anymore.
In /usr/src/kernels/... compiling gives an error straight from the start.
Where is now kernel's source code ?
short answer : "yum install kernel-devel", if that does not work get the .src.rpm for the kernel version and manually install that.
- K
Mário Gamito wrote:
Until 4.1, there was a kernel-sourcecode-2.6.9 RPM. Now in there isn't.
So, again, where is the kernel's sourcecode ?
The kernel-sourcecode pkg is deprecated upstream and dropped down the line, there will be no kernel-sourcecode pkg in CentOS4 anymore.
Refer back to my previous answer for how to do the job the 'right way', there is more info in the upstream provided Release Notes hosted at ( including an elaborate explaination on how to get the source tree from a src.rpm ) : http://mirror.centos.org/centos/4.2/os/i386/NOTES/RELEASE-NOTES-en.html
here is a tiny bit from that doc' that explains the situation:
" In order to eliminate the redundancy inherent in providing a separate package for the kernel source code when that source code already exists in the kernel's .src.rpm file, Red Hat Enterprise Linux 4 no longer includes the kernel-source package. Users that require access to the kernel sources can find them in the kernel .src.rpm file."
- K
On Wed, 2005-10-19 at 16:43 +0100, Karanbir Singh wrote:
Mário Gamito wrote:
Until 4.1, there was a kernel-sourcecode-2.6.9 RPM. Now in there isn't.
So, again, where is the kernel's sourcecode ?
The kernel-sourcecode pkg is deprecated upstream and dropped down the line, there will be no kernel-sourcecode pkg in CentOS4 anymore.
The upstream vendor's release notes recommend using "up2date --get-source kernel", so up2date handles the details of finding the package.
yum has no such option, so the user has to track down the package by hand. Could we add a URL for the source code to the CentOS release notes?
-David
Hi There,
Install Centos 4.1 X86-64 onto an athlon64 box.
unfortunately half way through a yum -y upgrade I press ctrl-c on the wrong window and aborted a couple of the packages in the (large) update.
Now the rpm database things there are multiple packages installed on the same rpm versions,
eg:
rpm -q -a | grep mysql
mod_auth_mysql-2.6.1-2.2 php-mysql-4.3.9-3.6 mysqlclient10-3.23.58-4.RHEL4.1 mysqlclient10-3.23.58-4.RHEL4.1 mysql-devel-4.1.10a-2.RHEL4.1 mysql-4.1.10a-2.RHEL4.1 mysql-4.1.10a-2.RHEL4.1 libdbi-dbd-mysql-0.6.5-10.RHEL4.1
rpm -e mysqlclient10-3.23.58-4.RHEL4.1 error: "mysqlclient10-3.23.58-4.RHEL4.1" specifies multiple packages
So I tried a "yum clean all" and tried again but yum fails with a transaction check error with conflicts of rpms onthemselves.
I did a rpm --rebuilddb with no joy, and i deleted the __db files from /var/lib/rpm - still no joy.
I cn't install any rpms now as it says there are conflicts....
I am fresh out of ideas now...
Any help appreciated...
P.
On 10/20/05, Peter Farrow peter@farrows.org wrote:
Hi There,
Install Centos 4.1 X86-64 onto an athlon64 box.
unfortunately half way through a yum -y upgrade I press ctrl-c on the wrong window and aborted a couple of the packages in the (large) update.
Now the rpm database things there are multiple packages installed on the same rpm versions,
eg:
rpm -q -a | grep mysql
mod_auth_mysql-2.6.1-2.2 php-mysql-4.3.9-3.6 mysqlclient10-3.23.58-4.RHEL4.1 mysqlclient10-3.23.58-4.RHEL4.1 mysql-devel-4.1.10a-2.RHEL4.1 mysql-4.1.10a-2.RHEL4.1 mysql-4.1.10a-2.RHEL4.1 libdbi-dbd-mysql-0.6.5-10.RHEL4.1
rpm -e mysqlclient10-3.23.58-4.RHEL4.1 error: "mysqlclient10-3.23.58-4.RHEL4.1" specifies multiple packages
These are most likely packages of different architecture. one i386, and one x86_64
So I tried a "yum clean all" and tried again but yum fails with a transaction check error with conflicts of rpms onthemselves.
I did a rpm --rebuilddb with no joy, and i deleted the __db files from /var/lib/rpm - still no joy.
REALLY not the right way to fix it.....
I cn't install any rpms now as it says there are conflicts....
I am fresh out of ideas now...
Any help appreciated...
do the following as root (and for your user also) echo "%_query_all_fmt %%{name}-%%{version}-%%{release}.%%{arch}" >> ~/.rpmmacros
then rpm -q mysqlclient10-3.23.58-4.RHEL4.1, and you will see the different packages. use the full packagename to remove one. should be something like mysqlclient10-3.23.58-4.RHEL4.1.i386 or mysqlclient10-3.23.58-4.RHEL4.1.x86_64
-- Jim Perrin System Administrator - UIT Ft Gordon & US Army Signal Center
I was aware of the 64 bit and 32 bit versions, but any yum'ing whatsoever fails now with a conflict from an existing installed version
why would a yum clean and rebuilddb not be the best way to fix rpm errors, certainly this has been the methods I have succesffully employed for many years....
If there is a better way then let me know...
It seems that yum is not able to update existing packages anymore and tries to install newer rpms along side the old ones....
Here is a sample out put of "yum install mysql-server"
Install: mysql-server.x86_64 0:4.1.12-3.RHEL4.1 - base
Performing the following to resolve dependencies: Update: mysql.x86_64 0:4.1.12-3.RHEL4.1 - base Total download size: 9.9 M Downloading Packages: Running Transaction Test Finished Transaction Test Transaction Check Error: file /usr/bin/mysqldumpslow from install of mysql-4.1 .12-3.RHEL4.1 conflicts with file from package mysql-4.1.10a-2.RHEL4.1 file /usr/share/info/mysql.info.gz from install of mysql-4.1.12-3.RHEL4.1 conf licts with file from package mysql-4.1.10a-2.RHEL4.1 file /usr/share/man/man1/mysql.1.gz from install of mysql-4.1.12-3.RHEL4.1 con flicts with file from package mysql-4.1.10a-2.RHEL4.1
etc etc
Jim Perrin wrote:
On 10/20/05, Peter Farrow peter@farrows.org wrote:
Hi There,
Install Centos 4.1 X86-64 onto an athlon64 box.
unfortunately half way through a yum -y upgrade I press ctrl-c on the wrong window and aborted a couple of the packages in the (large) update.
Now the rpm database things there are multiple packages installed on the same rpm versions,
eg:
rpm -q -a | grep mysql
mod_auth_mysql-2.6.1-2.2 php-mysql-4.3.9-3.6 mysqlclient10-3.23.58-4.RHEL4.1 mysqlclient10-3.23.58-4.RHEL4.1 mysql-devel-4.1.10a-2.RHEL4.1 mysql-4.1.10a-2.RHEL4.1 mysql-4.1.10a-2.RHEL4.1 libdbi-dbd-mysql-0.6.5-10.RHEL4.1
rpm -e mysqlclient10-3.23.58-4.RHEL4.1 error: "mysqlclient10-3.23.58-4.RHEL4.1" specifies multiple packages
These are most likely packages of different architecture. one i386, and one x86_64
So I tried a "yum clean all" and tried again but yum fails with a transaction check error with conflicts of rpms onthemselves.
I did a rpm --rebuilddb with no joy, and i deleted the __db files from /var/lib/rpm - still no joy.
REALLY not the right way to fix it.....
I cn't install any rpms now as it says there are conflicts....
I am fresh out of ideas now...
Any help appreciated...
do the following as root (and for your user also) echo "%_query_all_fmt %%{name}-%%{version}-%%{release}.%%{arch}" >> ~/.rpmmacros
then rpm -q mysqlclient10-3.23.58-4.RHEL4.1, and you will see the different packages. use the full packagename to remove one. should be something like mysqlclient10-3.23.58-4.RHEL4.1.i386 or mysqlclient10-3.23.58-4.RHEL4.1.x86_64
-- Jim Perrin System Administrator - UIT Ft Gordon & US Army Signal Center _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 10/20/05, Peter Farrow peter@farrows.org wrote:
I was aware of the 64 bit and 32 bit versions, but any yum'ing whatsoever fails now with a conflict from an existing installed version
why would a yum clean and rebuilddb not be the best way to fix rpm errors, certainly this has been the methods I have succesffully employed for many years....
You need to shift your thinking to multi-arch packages. RPM doesn't make this clear by default, which is why I suggested the line for your .rpmmacros file. Nuking should not be a troubleshooting step, but should be done with care, and generally as a last resort.
It seems that yum is not able to update existing packages anymore and tries to install newer rpms along side the old ones....
Here is a sample out put of "yum install mysql-server"
Install: mysql-server.x86_64 0:4.1.12-3.RHEL4.1 - base
Performing the following to resolve dependencies: Update: mysql.x86_64 0:4.1.12-3.RHEL4.1 - base Total download size: 9.9 M Downloading Packages: Running Transaction Test Finished Transaction Test Transaction Check Error: file /usr/bin/mysqldumpslow from install of mysql-4.1 .12-3.RHEL4.1 conflicts with file from package mysql-4.1.10a-2.RHEL4.1 file /usr/share/info/mysql.info.gz from install of mysql-4.1.12-3.RHEL4.1 conf licts with file from package mysql-4.1.10a-2.RHEL4.1 file /usr/share/man/man1/mysql.1.gz from install of mysql-4.1.12-3.RHEL4.1 con flicts with file from package mysql-4.1.10a-2.RHEL4.1
etc etc
This is very possibly still a multiarch issue, which again would require you to add the line I suggested to your .rpmmacros file. that will show if these packages are for i386, or for x86_64. This is the critical step in figuring what's causing your problem.
-- Jim Perrin System Administrator - UIT Ft Gordon & US Army Signal Center
Hi Jim,
yes I did add the line you suggested straight away and indeed shows the multi-arch packages as you describe...
however the yum snapshot was consitent with and without the macro definition for rpm, and still doesn't work.
Its a new server build too, and was working fine until I yum -y update 'd it, now it bails everytime.
Shame too as it now has 200 users on it... :-(
P.
Jim Perrin wrote:
On 10/20/05, Peter Farrow peter@farrows.org wrote:
I was aware of the 64 bit and 32 bit versions, but any yum'ing whatsoever fails now with a conflict from an existing installed version
why would a yum clean and rebuilddb not be the best way to fix rpm errors, certainly this has been the methods I have succesffully employed for many years....
You need to shift your thinking to multi-arch packages. RPM doesn't make this clear by default, which is why I suggested the line for your .rpmmacros file. Nuking should not be a troubleshooting step, but should be done with care, and generally as a last resort.
It seems that yum is not able to update existing packages anymore and tries to install newer rpms along side the old ones....
Here is a sample out put of "yum install mysql-server"
Install: mysql-server.x86_64 0:4.1.12-3.RHEL4.1 - base
Performing the following to resolve dependencies: Update: mysql.x86_64 0:4.1.12-3.RHEL4.1 - base Total download size: 9.9 M Downloading Packages: Running Transaction Test Finished Transaction Test Transaction Check Error: file /usr/bin/mysqldumpslow from install of mysql-4.1 .12-3.RHEL4.1 conflicts with file from package mysql-4.1.10a-2.RHEL4.1 file /usr/share/info/mysql.info.gz from install of mysql-4.1.12-3.RHEL4.1 conf licts with file from package mysql-4.1.10a-2.RHEL4.1 file /usr/share/man/man1/mysql.1.gz from install of mysql-4.1.12-3.RHEL4.1 con flicts with file from package mysql-4.1.10a-2.RHEL4.1
etc etc
This is very possibly still a multiarch issue, which again would require you to add the line I suggested to your .rpmmacros file. that will show if these packages are for i386, or for x86_64. This is the critical step in figuring what's causing your problem.
-- Jim Perrin System Administrator - UIT Ft Gordon & US Army Signal Center _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 10/20/05, Peter Farrow peter@farrows.org wrote:
Hi Jim,
yes I did add the line you suggested straight away and indeed shows the multi-arch packages as you describe...
however the yum snapshot was consitent with and without the macro definition for rpm, and still doesn't work.
Okay, so if it's listing both versions of the same package, then the next step is to check yum to see what's available, WITH the script in .rpmmacros. 'yum list packagename' should show you the packages available. My suspicion is that there's an upgrade for one, but not the other, which would lead to your conflict. If this is indeed the case, please paste the versions and the yum output here (again, with the script in .rpmmacros) so that we can see where the problem is. It may be something on the repository end that was overlooked, or it could be something as simple as removing one of the packages. To be safe, I'd like to see what's there before I say to just go ahead and uninstall one of them.
-- Jim Perrin System Administrator - UIT Ft Gordon & US Army Signal Center
Hi Jim,
I think its a bit more serious than that, as a yum-y upgrade lists 100s of packages with the same type of conflict....
Here is the output from "yum list packagename"
yum list packagename
Setting up Repos update 100% |=========================| 951 B 00:00 base 100% |=========================| 1.1 kB 00:00 addons 100% |=========================| 951 B 00:00 extras 100% |=========================| 1.1 kB 00:00 Reading repository metadata in from local files update : ################################################## 33/33 base : ################################################## 1628/1628 extras : ################################################## 23/23
Output from yum -y upgrade is huge, but I give you some of it....
The history of this is that the first yum -y upgrade went ok, (296 packages) but I ctrl-c'ed two by mistake as it was downloading them, yum carried on and installed the rest, but I thought I would yum again to get the two I missed and this problem cropped up..
Now it wants to update them all again and list a conflict for each... the error output for yum was not captured in the file I redirected it to, but essentially its the same as the one for mysql I showed you earlier but for every package it seems...
P.
Jim Perrin wrote:
On 10/20/05, Peter Farrow peter@farrows.org wrote:
Hi Jim,
yes I did add the line you suggested straight away and indeed shows the multi-arch packages as you describe...
however the yum snapshot was consitent with and without the macro definition for rpm, and still doesn't work.
Okay, so if it's listing both versions of the same package, then the next step is to check yum to see what's available, WITH the script in .rpmmacros. 'yum list packagename' should show you the packages available. My suspicion is that there's an upgrade for one, but not the other, which would lead to your conflict. If this is indeed the case, please paste the versions and the yum output here (again, with the script in .rpmmacros) so that we can see where the problem is. It may be something on the repository end that was overlooked, or it could be something as simple as removing one of the packages. To be safe, I'd like to see what's there before I say to just go ahead and uninstall one of them.
-- Jim Perrin System Administrator - UIT Ft Gordon & US Army Signal Center _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Wed, 2005-10-19 at 16:26 +0100, Mário Gamito wrote:
Hi,
No, that's not that. You're mistaken.
Until 4.1, there was a kernel-sourcecode-2.6.9 RPM. Now in there isn't.
So, again, where is the kernel's sourcecode ?
Warm Regards, Mário Gamito
The Kernel sourcecode is not like kernel-source. It is a noarch rpm that does not get arch specific patches added to the source, making it relatively worthless as a package for building kernels.
Because of that, and because it is not down by either fedora or the upstream provider, we are also no longer producing a kernel-sourcecode rpm.
If one needs a full kernel tree, they can download the kernel SRPM from here:
http://mirror.centos.org/centos/4/os/SRPMS/
OR
http://mirror.centos.org/centos/4/updates/SRPMS/
Then install the source with the command:
rpm -i kernel-xxxx.src.rpm
Then go to the SPECS directory (Usually /usr/src/redhat/SPECS) and get a full kernel tree with the command:
rpmbuild -bp --target i686 kernel-2.6.spec
(substitute your target arch)
Then go to the BUILD directory and you will have a real (and patched) tree:
cd ../BUILD
Karanbir Singh wrote:
Mário Gamito wrote:
I've just installed CentOS 4.2 I must recompile the kernel and for that i used to do a "yum install kernel-sourcecode".
Now, it doesn't works anymore.
In /usr/src/kernels/... compiling gives an error straight from the start.
Where is now kernel's source code ?
short answer : "yum install kernel-devel", if that does not work get the .src.rpm for the kernel version and manually install that.
- K
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 10/19/05, Johnny Hughes mailing-lists@hughesjr.com wrote:
On Wed, 2005-10-19 at 16:26 +0100, Mário Gamito wrote:
Hi,
No, that's not that. You're mistaken.
Until 4.1, there was a kernel-sourcecode-2.6.9 RPM. Now in there isn't.
So, again, where is the kernel's sourcecode ?
Warm Regards, Mário Gamito
The Kernel sourcecode is not like kernel-source. It is a noarch rpm that does not get arch specific patches added to the source, making it relatively worthless as a package for building kernels.
Because of that, and because it is not down by either fedora or the upstream provider, we are also no longer producing a kernel-sourcecode rpm.
If one needs a full kernel tree, they can download the kernel SRPM from here:
http://mirror.centos.org/centos/4/os/SRPMS/
OR
http://mirror.centos.org/centos/4/updates/SRPMS/
Then install the source with the command:
rpm -i kernel-xxxx.src.rpm
Then go to the SPECS directory (Usually /usr/src/redhat/SPECS) and get a full kernel tree with the command:
rpmbuild -bp --target i686 kernel-2.6.spec
(substitute your target arch)
Then go to the BUILD directory and you will have a real (and patched) tree:
cd ../BUILD
I'd follow that up with this how-to for proper kernel rebuilds on rpm based distros so that rpm knows about your new kernel. It's not directly for centos, but the ideas and basics are the same.
http://crab-lab.zool.ohiou.edu/kevin/kernel-compilation-tutorial-en/
-- Jim Perrin System Administrator - UIT Ft Gordon & US Army Signal Center
On Wednesday 19 October 2005 13:29, Jim Perrin wrote:
I'd follow that up with this how-to for proper kernel rebuilds on rpm based distros so that rpm knows about your new kernel. It's not directly for centos, but the ideas and basics are the same.
I love his warning on the front page.
Johnny Hughes wrote:
The Kernel sourcecode is not like kernel-source. It is a noarch rpm that does not get arch specific patches added to the source, making it relatively worthless as a package for building kernels.
Because of that, and because it is not down by either fedora or the upstream provider, we are also no longer producing a kernel-sourcecode rpm.
If one needs a full kernel tree, they can download the kernel SRPM from here:
http://mirror.centos.org/centos/4/os/SRPMS/
OR
http://mirror.centos.org/centos/4/updates/SRPMS/
Then install the source with the command:
rpm -i kernel-xxxx.src.rpm
Then go to the SPECS directory (Usually /usr/src/redhat/SPECS) and get a full kernel tree with the command:
rpmbuild -bp --target i686 kernel-2.6.spec
(substitute your target arch)
Then go to the BUILD directory and you will have a real (and patched) tree:
cd ../BUILD
Note that alternatively, you can make your own kernel-sourcecode rpm by editing the spec file once you install the .src.rpm. You will see several "%define"s right near the front, one of which is "buildsource" and by setting that to "1" (and I usually set the others to "0" so it won't take so long), rather than doing the rpmbuild -bp, you can then do something like:
rpmbuild -bb --target i686 kernel-2.6.spec
and you will get your own kernel-sourcecode rpm in the RPMS/<arch> directory.
Linus
Hi Linus,
Linus Hicks wrote:
The Kernel sourcecode is not like kernel-source. It is a noarch rpm that does not get arch specific patches added to the source, making it relatively worthless as a package for building kernels.
Note that alternatively, you can make your own kernel-sourcecode rpm by editing the spec file once you install the .src.rpm. You will see several "%define"s right near the front, one of which is "buildsource" and by setting that to "1" (and I usually set the others to "0" so it won't take so long), rather than doing the rpmbuild -bp, you can then do something like:
rpmbuild -bb --target i686 kernel-2.6.spec
and you will get your own kernel-sourcecode rpm in the RPMS/<arch> directory.
As Johnny already pointed out in his post - the kernel-sourcecode rpm that you generate using this method will not really be the kernel source that reflects the real state of the binary kernel.
Try building a kernel out of this source, compare with the binary kernel built out of the .src.rpm and the point is easily demonstrated.
- K
Mário Gamito lists@tuxdoit.com wrote:
Hi, No, that's not that. You're mistaken. Until 4.1, there was a kernel-sourcecode-2.6.9 RPM. Now in there isn't. So, again, where is the kernel's sourcecode ?
Instead of responding to yet another one of these posts (I'm on a lot of lists ;-), I've decided to write a full blog entry that answers most everything I can think of:
http://thebs413.blogspot.com/2005/10/kernel-26-on-fedora-based-systems.html