|
so where do i move from here now and what exactly is yum what do i have to install to use yum to get a C/C++ compiler
|
Quote:
|
Quote:
|
does yum require a registration to the RHN if yes then that is not possible for me......is there any other way i can install a C/C++ compiler
|
Quote:
|
Read post #16. Yum is a package management system. That means it determines all of the required dependencies and downloads, then installs and configures them from a collection of rpm's called a repository. All you need to do I think is change the file that tells yum where to look for the repository from the RHEL servers to the Centos servers, because they are the exact same rpms. There is a link in that post that refers to a thread that tells you what to change in the file. You can also post to the Centos help forum for more help in this.
Linux used to be hard because of all this "dependency hell". Package management systems were created to remove this burden. Red Hat/Fedora/Centos uses yum as the package manager. Debian based systems typically uses apt-get and the associated gui interface synaptic. Centos help forum http://centos.org/modules/newbb/index.php?cat=8 Keep up your efforts...you are learning...keep asking questions and posting results as you progress RHEL charges you a subscription fee to use their repository on their servers. Centos copies all of this and makes it free on their servers. Just change the file that tells yum where to look for all those rpms, and it will handle the rest. Yum is already installed on your linux installation. |
is there any one package that i can download and get a C/C++ compiler instead of struggling with individual packages and without using yum.......i am a newbie and want to start off with writing C/C++ programs....i do not have a registration to the RHN....i am using Red Hat Enterprise Linux 5
|
Quote:
|
this is the content of the file /etc/yum.repos.d/rhel-debuginfo.repo
[rhel-debuginfo] name=Red Hat Enterprise Linux $releasever - $basearch - Debug baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/$basearch/Debuginfo/ enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release [CentOS5 base] name=CentOS-5-Base mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=os #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ gpgcheck=0 enabled=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5 when i typed yum list gcc-4.1.2-42.el5.i386.rpm this is what i got Loading "installonlyn" plugin Loading "rhnplugin" plugin This system is not registered with RHN. RHN support will be disabled. Setting up repositories CentOS5 base 100% |=========================| 1.1 kB 00:00 Reading repository metadata in from local files primary.xml.gz 100% |=========================| 853 kB 00:05 ################################################## 2458/2458 then i typed yum install gcc-4.1.2-42.el5.i386.rpm this is wht i got Loading "installonlyn" plugin Loading "rhnplugin" plugin This system is not registered with RHN. RHN support will be disabled. Setting up Install Process Setting up repositories Reading repository metadata in from local files Parsing package install arguments No Match for argument: gcc-4.1.2-42.el5.i386.rpm Nothing to do what do i do now |
by seeing the contents of my /etc/yum.repos.d/rhel-debuginfo.repo file will i be now always directed to the centos server for yum commands ??
|
I understand what you are saying and what you are asking. Once you have the compiler installed, the answer will be yes, you can just download a source code file of the form package.tar.gz, then unzip it, un-tar it, and them issue the commands
./configure make make install That tells the compiler to compile the source code into machine language that the computer can execute directly. Unfortunately, you don't yet have a compiler installed. That is what you are trying to do, so you can't compile your compiler from source code....exasperating, huh? The next step up in simplicity is to download a package of the form package.rpm and use the rpm command to install it. rpm's are already compiled. Unfortunately, they don't contain all of the source code necessary to get the application running. People use rpms to break all the code of the computer into pieces for easier handling and to avoid duplication of code/effort. The rpm lists the other pieces of code they need to talk to in order to get the application working. These pieces are other rpm files called dependencies, as the one rpm depends on the other. The rpm command tells you what other rpms it needs, and you have to find them download them, and install them in the order necessary so that all dependencies are met sequentially. Package management systems, like yum, were made to ease this burden. The entire collection of all rpms, the whole "web" of them that has to hang together, is stored in one place called a repository, hosted on some web server. yum has access to all of the rpms, and all the rpms describe their dependencies, so yum can figure out which rpms it needs to install the application you want, and the order they have to be installed in, and then does all this for you. Without package management, life is tough and you become a book-keeping accountant and scrounger looking for rpms, as you have noticed. There is a file associated with yum that tells it where to find this repository on the internet. The link in post 16 shows what the entries should look like if you want to use the free centos repository, which is a blatant copy of the red hat network one that Red Hat won't let you use without paying them a subscription fee. I hope this is beginning to make sense. keep posting here or on the centos forums. As one person has said...you wouldn't have to even change the yum repository file if you are not too far into RHEL yet and would just instead install Centos 5 at the outset. It is a 100% copy of RHEL 5 without the red hat name (trademarked) and the red fedora man logo. It is up to you...change the yum repository file as in post 16 link, or just download, burn and install centos 5 and be done with it. you can even use a net-installer within windows to download centos, as well as many other linux distributions: http://en.wikipedia.org/wiki/Unetbootin you just download it if you are dual booting windows, open it like any other wizard installation app, and let it do the rest of the linux dual booting installation. Otherwise download and burn a cd of centos5 and install it...it is actually up to 5.1 now. keep posting...we want to help you. |
you are doing great and almost there...it may be that the particular version of the c/c++ compiler you are trying to install is not actually the one in either the RHEL 5 or Centos5 repositories.
I hope someone else will pipe in and tell him how to search the repository using yum to find a suitable c/c++ package that is actually in the repository. I am used to Debian and apt-get. try reading the man page for yum by typing "man yum" at the command line and then read the instructions for how to carry out a search of the repository for a particular application. Also try a google search for something like yum search package It should be a simple command like yum locate gcc or yum find gcc or yum package gcc and then it should tell you the name of the actually package. Then you can just type yum install whatever_package_is_called yes, once you changed and saved that repo file, it should now always look to the centos servers for rpms. You are doing great. |
ok I think I found how you can install all the developer packages at one time (including of course the compiler)
issue the command # yum groupinstall 'Development Tools' (without the #, that is just an example of a prompt) at the terminal prompt. It may take awhile...because it is a lot of packages...but very helpful for development...including support for the following make => pkgconfig => gettext => automake => strace64 => gdb => bison => libtool => autoconf => gcc-c++ => binutils and all dependencies. |
Quote:
gr8 Ehawk, U explain him very well, I think u should be teacher..wht u say |
All times are GMT -5. The time now is 07:26 AM. |