Fedora Linux Support Community & Resources Center
  #1  
Old 5th February 2012, 04:57 PM
GregLee Offline
Registered User
 
Join Date: Jun 2007
Location: Waimanalo, HI
Posts: 73
linuxfirefox
How to tell yum to install headers?

Is there an easy way to get yum, or whatever installer I use, to install header files and whatever other files I would need to compile against any libraries I install? The last time I installed Fedora, I must have made a mistake about this, because getting the files I needed for development, or simply compiling software by hand, caused me a lot of trouble. I would often have to go looking for header files, because they hadn't been installed by default, and it was such a pain that eventually I just stopped using rpm or yum at all.

I'm about to do a new install of Fedora 16, and I'm hoping to find a better way, this time around.
__________________
Greg
Reply With Quote
  #2  
Old 5th February 2012, 05:44 PM
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 6,054
linuxfirefox
Re: How to tell yum to install headers?

The only tool I use for finding and installing software, including the *-devel packages which contain the header files for specific libraries, is yum. For compiling code, you can start off getting the basics with:
Code:
yum group install "Development Libraries" "Development Tools"
There are several other speciality "Development" groups.. i.e "Legacy Software Development" and "X Software Development". Just use the "yum group list" command to see them all.

Expecting Fedora to install every single *-devel rpm package in it's repositories by default so they would "just be there" for your immediate use is wrong headed thinking. Here is the number of *-devel packages I currently have installed on my system:
Code:
BASH:~/-> yum list installed | grep devel | wc -l
96
And here is the number of additional *-devel packages if I asked yum to give them all to me:
Code:
BASH:~/-> yum list available | grep "\-devel" | wc -l
5271
I don't even want to think about how much disk space would be required to accommodate all that, much less the fact that probably 98% of those would never ever ever be needed/used by me. It's generally fairly easy to use yum to determine what *-devel package you need to install for a given "missing" header.

Aside from the usual looking into the README and INSTALLING files that generally come with most source code tarball packages and checking for any advice on what libraries are needed at the projects website, say, for instance, you run a ./configure and it halts on some error about not finding "zzlp/lib.h". What to install to get the missing "lib.h"? Use yum to find out:
Code:
BASH:~/-> yum provides *zzip/lib.h
Loaded plugins: langpacks, presto
updates/filelists_db                                                                                                 | 7.7 MB     00:24     
zziplib-devel-0.13.59-2.fc15.i686 : Development files for the zziplib library
Repo        : fedora
Matched from:
Filename    : /usr/include/zzip/lib.h



zziplib-devel-0.13.59-2.fc15.x86_64 : Development files for the zziplib library
Repo        : fedora
Matched from:
Filename    : /usr/include/zzip/lib.h



zziplib-devel-0.13.59-2.fc15.x86_64 : Development files for the zziplib library
Repo        : @fedora
Matched from:
Filename    : /usr/include/zzip/lib.h
Easy enough: yum install zziplib-devel
Yes, you still have to "go looking for header files" when compiling code in Fedora, but it's not that hard or daunting a task.

Last edited by PabloTwo; 5th February 2012 at 05:54 PM.
Reply With Quote
  #3  
Old 5th February 2012, 05:49 PM
GregLee Offline
Registered User
 
Join Date: Jun 2007
Location: Waimanalo, HI
Posts: 73
linuxfirefox
Re: How to tell yum to install headers?

Quote:
Originally Posted by PabloTwo View Post
Yes, you still have to "go looking for header files" when compiling code in Fedora, but it's not that hard or daunting a task.
Thanks for the information. I guess that is a "no" answer to my question.
__________________
Greg
Reply With Quote
  #4  
Old 5th February 2012, 05:58 PM
JEO Offline
Registered User
 
Join Date: Jan 2006
Posts: 2,787
linuxfirefox
Re: How to tell yum to install headers?

If you are compiling starting from a source rpm, there is a command in the yum-utils package called yum-builddep which goes and installs everything you need to compile the source rpm package.
Reply With Quote
  #5  
Old 5th February 2012, 07:18 PM
GregLee Offline
Registered User
 
Join Date: Jun 2007
Location: Waimanalo, HI
Posts: 73
linuxfirefox
Re: How to tell yum to install headers?

Quote:
Originally Posted by PabloTwo View Post
I don't even want to think about how much disk space would be required to accommodate all that, ...
Oh, and I don't see why disk space would be a problem. I can't count the devel packages on my system now (because I stopped keeping up the yum and rpm databases), but I just counted the number of files in my /usr/include, and that is over 23,000 -- just a normal accumulation of a few years of use. And my new computer will have 6 times the disk space.

I think it's sad if yum doesn't have a switch saying "give me the devel files too, and also for any dependencies, dependencies of dependencies, and so on." Getting us out of dependency hell is what it's supposed to be for.

---------- Post added at 09:18 AM ---------- Previous post was at 09:16 AM ----------

Quote:
Originally Posted by JEO View Post
yum-builddep
That will be useful.
__________________
Greg
Reply With Quote
  #6  
Old 5th February 2012, 06:07 PM
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 6,054
linuxfirefox
Re: How to tell yum to install headers?

Quote:
Originally Posted by GregLee
Thanks for the information. I guess that is a "no" answer to my question.
Yes, I suppose that is a no to your question.
Reply With Quote
Reply

Tags
headers, install, yum

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help me i want to install the linux kernel headers/sources to install the drivers ... xrhstaras Hardware & Laptops 6 21st November 2011 05:03 AM
Can't Find/Install Headers for my Kernel mbritojr Using Fedora 1 27th January 2010 10:15 PM
how do i install kernel headers? rmhiggins Using Fedora 24 24th July 2009 12:50 PM
install kernel-headers?? maffioso Using Fedora 13 24th September 2006 10:54 AM
how to install kernel headers ? voam Using Fedora 4 5th September 2005 07:38 AM


Current GMT-time: 13:10 (Saturday, 26-07-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat