Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
You type that into your terminal:
man apt
It will bring up the manpage for apt. From there, you will see (since I found a man page for it) that you use apt-get to install things. So then you will read the manpage for apt-get:
man apt-get
Which will tell you to type something like this:
apt-get install gcc
To install GCC.
So, if you just want a command, and don't wanna read anything, try this:
Originally posted by strider_D_3000 on this command ls | grep gcc noughting pop up u sure its installation cd redhat cd 1?
No, but it is very likely it is. I'm not sure which CD GCC is on, but it is definitely included in the redhat download iso's packages because it's necessary for kernel compiles and VERY basic compiling of other packages. So no, it might not be on the first, but it is surely on one of them.
You can check your packages list to find which one.
it gave me error:cannot get excclusive lock on /var/lib/rpm/package
error:cannot open packages database in E: could not open RPM database in command apt-get install gcc
Originally posted by MasterC Are you root? You will need to be root when you do this...
And just for sanities sake, run this first (as root):
rpm --rebuilddb
updatedb
And then:
apt-get install gcc
Cool
i got this error:db4 error(16) from dbenv->removeevice or resource busy on this command rpm --rebuilddb
but on this command alone apt-get install gcc (in as root ) i got this
package gss has no available version,but exists in the database. this typically means that the package was mentioned in a dependency and never uploaded, has been obsoleted or is not avaiable with the contents of the sources.list
E: package gcc has no installation candidate
Yes, but those too will have dependency problems. Type:
man apt
And in addition:
man apt-cdrom
man apt.conf
For more info setting apt up to work with your CDROM drive.
Anyway, if you wanna hand install those 9 rpms and their dependencies, yes, do that with:
rpm -ivh gcc.rpm g++.rpm ...
Where gcc.rpm g++.rpm and ... are all just representations of ALL of the files you need to install. What I mean is you will want/need to place them all on a single line to satisify the redundant dependencies (such as gcc needs g++ but g++ needs gcc ).
Good Luck.
apt-get is giving that error list probably means you need to tweak your apt.conf file in /etc. Once you get that file setup correctly (by defining a mirror to get packages from probably) then the rest is history (likely).
GCC will still be required to compile the kernel after you are done configuring it, but at least you can get started on that since reading all those help files will take a good while.
Originally posted by strider_D_3000 man its so confusing what should i do next? i have noidea what you just say
That's ok, I'll break it down a bit.
Man pages are things that describe how to use applications. With apt there are many man pages for different parts of it. One of the man pages in one for apt.conf which resides in /etc/apt.conf The file is a text file that will be used by apt when using it to install packages. You can edit this file to suit your needs, but to do so, you will need to learn what you can and can't put in that file. For example, if you wanted to tell it to your floppy drive to get files, you wouldn't simply edit the file and at any given place type:
use my floppy drive
Instead you'd need to consult the man page, which is done by typing in 'man' followed by the application or configuration file you are wanting to read a man (manual) for, so for this it would be:
man apt.conf
And it should describe some of the information in there for you. At the bottom of that file it will have "See also" man pages for other configurations you can look at with regards to (WRT is the acronym for that you may see from time to time) apt. So by looking at:
man apt
You will see "See also" and things like apt-get apt-cdrom What these mean is if you type:
man apt-cdrom
A new manual page (man page) will pop up with more information.
It's a great tool, but the only draw back is that sometimes man pages assume you know how to use the application, hence my comment on the 'lawyer gibberish' but that's what we are all here for. We will help you through those parts that you don't quite understand. Other places to look for info are:
google.com/linux
And you should also look at the tutorial (linux 101) over at www.linux.org
The man pages are your friend, even though sometimes they can seem very frustrating!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.