LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-16-2006, 03:47 PM   #1
agentx606
LQ Newbie
 
Registered: Apr 2006
Posts: 2

Rep: Reputation: 0
Installing programs


I am new to Linux, I have Unbuntu Linux installed on my computer now. I have noticed that if you go to add new program there is a list that you can choose from and you check them and it will install them for you. but I was wondering how you install programs that you download on your own, for example, I downloaded Clamav and I just can't figure out how to install it.

any help would be greatly appreciated such as some good tips for new users and help with what I have already stated. thank you.
 
Old 04-16-2006, 04:03 PM   #2
bernied
Member
 
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304

Rep: Reputation: 30
It's always easier to use the package manager if the thing you want is available.
Clamav is available through the Synaptic Package Manager, you just need to add the Universe repository to get it.
Settings - Repositories - Add (button)

But to answer your question, it depends on what form you download it in.
If it's a .deb, you use dpkg, if it's source, you need to unzip it (tar) and compile it (make)
Or if it's some script, like java or perl, you just have to put it in the right place.

There is usually a readme included with the package, or at the download site.
 
Old 04-16-2006, 04:06 PM   #3
bernied
Member
 
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304

Rep: Reputation: 30
The package manager (in the gnome menu) is at
System - Administration - Synaptic Package Manager
It does the same thing as the Add Applications application, and more.
 
Old 04-16-2006, 04:54 PM   #4
binarybob0001
Member
 
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 444

Rep: Reputation: 30
Too be honest, compiling things in linux is a pain in the @$$. Every developer has his own special way of doing things. As a result, for anything you want to install, you have to read the documentation and become very familiar with it.

I started my own thread on this previously. It was my intention to make a tutorial to help beginners like yourself to install things on their own. Unfortunately, no one really knows what they are doing here. If you do, prove it. Write a tutorial on making packages even ones that checkinstall doesn't work with.

That said, I'll help as much as I can. Most packages are compiled using the configure and make system. All you need to type is.
./configure
make
make install

The configure script will look for parts of the source that may be missing or other needed libraries that may be missing. It's called dependency checking.

The make command actually builds the binaries. If you search through the directories of the package you should find some executable files after this command is executed.

The make install simply copies the files from the directory you built them in to there appropriate location in the filesystem such as /usr/bin or usr/local/bin (the default).

There are some other options and things you should know about. If you write
./configure --prefix=/usr
The files will be installed from the user directory on up. This is kind of like the root directory for the install program. So setting --prefix to /usr/local would install things in the /usr/local hierarchy. Anything not included with you distribution should be installed to /usr/local. If you are upgrading something in your distribution, install to /usr. The make install command does not always honor these settings.

The CFLAGS and CXXFLAGS environment variables set optimizations for the compiler. By default you are compiling for the 80386 processor. I run a 80686 or Pentium 4 processor. As a result I tell the compiler to compile for my specific processor by setting the CFLAGS variable.
export CFLAGS="-march=pentium4 -O2"
The O2 at the end tells the compiler to try and optimize my code farther by eliminating unnecessary function calls and such. Warning, the make program does not have to honor your CFLAGS settings.

If you want to make your own packages, try a program called checkinstall. For more information read:
File Hierarchy Standard (FHS)
Anything you can find on the GCC compiler.

For anything else that is just a little strange to install, ask around here.

As a side note, currently the most common build and install system is not forced to honor the users settings which I find extremely irritating. If any linux pros are reading this, please add this to your list of problems to be solved.
 
Old 04-17-2006, 12:48 AM   #5
agentx606
LQ Newbie
 
Registered: Apr 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by binarybob0001
Too be honest, compiling things in linux is a pain in the @$$. Every developer has his own special way of doing things. As a result, for anything you want to install, you have to read the documentation and become very familiar with it.

I started my own thread on this previously. It was my intention to make a tutorial to help beginners like yourself to install things on their own. Unfortunately, no one really knows what they are doing here. If you do, prove it. Write a tutorial on making packages even ones that checkinstall doesn't work with.

That said, I'll help as much as I can. Most packages are compiled using the configure and make system. All you need to type is.
./configure
make
make install

The configure script will look for parts of the source that may be missing or other needed libraries that may be missing. It's called dependency checking.

The make command actually builds the binaries. If you search through the directories of the package you should find some executable files after this command is executed.

The make install simply copies the files from the directory you built them in to there appropriate location in the filesystem such as /usr/bin or usr/local/bin (the default).

There are some other options and things you should know about. If you write
./configure --prefix=/usr
The files will be installed from the user directory on up. This is kind of like the root directory for the install program. So setting --prefix to /usr/local would install things in the /usr/local hierarchy. Anything not included with you distribution should be installed to /usr/local. If you are upgrading something in your distribution, install to /usr. The make install command does not always honor these settings.

The CFLAGS and CXXFLAGS environment variables set optimizations for the compiler. By default you are compiling for the 80386 processor. I run a 80686 or Pentium 4 processor. As a result I tell the compiler to compile for my specific processor by setting the CFLAGS variable.
export CFLAGS="-march=pentium4 -O2"
The O2 at the end tells the compiler to try and optimize my code farther by eliminating unnecessary function calls and such. Warning, the make program does not have to honor your CFLAGS settings.

If you want to make your own packages, try a program called checkinstall. For more information read:
File Hierarchy Standard (FHS)
Anything you can find on the GCC compiler.

For anything else that is just a little strange to install, ask around here.

As a side note, currently the most common build and install system is not forced to honor the users settings which I find extremely irritating. If any linux pros are reading this, please add this to your list of problems to be solved.
well the things is I don't even really know where to start. I know how to get to the Terminal... I beleive that's where you type all those commands? but I tried to type those commands in but it doesn't do anything and I don't understand how it could know that I am trying to command things that are in that folder... ehhh I feel like an idiot.
 
Old 04-17-2006, 01:59 AM   #6
binarybob0001
Member
 
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 444

Rep: Reputation: 30
Well, you know how to do one thing I don't. Quote text
Yes, you have to enter those commands on a command line interfact (CLI). I tell you what. Since I'm such a nice guy (unlike some around here) I'll work through this one with you. I downloaded the clamav package. That should be your first step too.
http://sourceforge.net/project/showf...ease_id=407078
Goto that link and download the clamav-0.88.1.tar.gz
Save it to your ~ directory.
After that cd to your ~ directory using this command.
cd ~
Unpack the package with this command
tar -zxf clamav-0.88.1.tar.gz
This command calls the tar program. The -zxf means to decompress the files, extract the file and the file is named clamav-0.88.1.tar.gz respectively.
Type ls and hit enter. You should see a directory call clamav-0.88.1. Enter that directory using the command.
cd clamav-0.88.1
Type the following commands, and you have installed your first program.
./configure
make
make install
Study what we did here. I stepped you through this time, but you need to learn why we did what we did. Also, you want to check out package creation as soon as you understand what we did here. If you think this was hard, you should look at what it takes to make a package.
 
Old 04-17-2006, 04:23 AM   #7
sc425000
LQ Newbie
 
Registered: Jan 2006
Posts: 8

Rep: Reputation: 0
there have tree magic command for install program in linux

In source directory

#./configure
# make
# make install

Just Have Fun
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing new programs Sonny89 Linux - Software 1 12-06-2005 08:47 AM
Installing programs iAchilles Linux - Newbie 8 02-28-2005 05:38 AM
Installing programs CommieWithAPie Linux - Newbie 2 07-27-2003 09:49 AM
Installing Programs biggiefatts Linux - Newbie 8 05-26-2002 12:52 PM
Installing programs??? perfectpitch Linux - Newbie 1 03-25-2001 04:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration