Gizmo's Freeware Forum

Gizmo's Freeware Forum (https://www.techsupportalert.com/freeware-forum/)
-   Linux (https://www.techsupportalert.com/freeware-forum/linux/)
-   -   Linux command line intro (https://www.techsupportalert.com/freeware-forum/linux/897-linux-command-line-intro.html)

debtboy 31. May 2009 10:08 PM

compile and install from source
 
OK, how about we install a 3rd party application from source.

First of all, you should always install software from packages (.rpm, .deb, etc...),
Packages automatically take care of dependencies.
Packages are usually available for most mainstream applications, but not all.

If a package isn't available for download, or your distro package doesn't match
what's available, then installing from source is always an option.

Source is almost always available, can be compiled on most systems
and is usually always in a zipped file tar.gz or tar.bz2
It's actually zipped (gzip) tar (tape archive) file, typically referred to as a tarball.

So lets get started...
I've chosen a third party application called conky (evolved from torsmo).
Here is the download link:
http://conky.sourceforge.net/index.html

http://home.comcast.net/~linuxboy/source1.jpg

Clicking the Latest Release "Get Conky" takes you to the page below.
We want the conky-1.7.0.tar.gz file.

http://home.comcast.net/~linuxboy/source2.jpg

save the file to your home directory.

http://home.comcast.net/~linuxboy/source3.jpg

No lets look at the downloaded package with ls -l

http://home.comcast.net/~linuxboy/source4.jpg

see next post

debtboy 31. May 2009 10:26 PM

Now it's time to unarchive these files.
Use the following command
tar -xvf conky.1.7.0.tar.gz

http://home.comcast.net/~linuxboy/source5.jpg

It should start unpacking...
many directory and file names will scroll by.

http://home.comcast.net/~linuxboy/source6.jpg

Now so you can see,
clear which will clear the screen and do a
ls -ld conky* I've added the d so it would list the directory
and not the contents of the directory and the conky* will list
starting with conky.
We see the original tarball and a new directory
conky-1.7.0

http://home.comcast.net/~linuxboy/source7.jpg

Now we'll enter that directory cd conky-1.7.0
We expect a README and INSTALL file for additional instructions
from the author.

http://home.comcast.net/~linuxboy/source8.jpg

see next post

debtboy 31. May 2009 10:37 PM

Now we do a listing of the new directory ls,
I'm not using the -l long format, because I want to see all the files.

http://home.comcast.net/~linuxboy/source9.jpg

Now we do a more README, the person who created the files
might leave special instructions for configuring or compiling the files.

http://home.comcast.net/~linuxboy/source10.jpg

Here I've scrolled down to a more important part of the file.

http://home.comcast.net/~linuxboy/source11.jpg

I don't see anything special, so lets move on.
It's time to run the configure file.
try ./configure the ./ just say the directory your currently in.

http://home.comcast.net/~linuxboy/source12.jpg

see next post

debtboy 31. May 2009 10:49 PM

When running the config file, any dependency or other problems
will be displayed. It checks your system for everything it needs.
If it needs something like a compiler, it will tell you now.

Running the config didn't turn up any problems for me (see image).

http://home.comcast.net/~linuxboy/source13.jpg

Here I've just scrolled down to the bottom

http://home.comcast.net/~linuxboy/source14.jpg

Now I need to become root, only root can install software.
su root
then I ran clear to clear the screen.

It's time to compile the source code.
make that's all it takes to compile.

http://home.comcast.net/~linuxboy/source15.jpg

You will see all kinds of text scroll by.

http://home.comcast.net/~linuxboy/source16.jpg

see next post

debtboy 31. May 2009 10:56 PM

Now I normally clear the screen and run:
make install that's all it takes to install the program.

http://home.comcast.net/~linuxboy/source17.jpg

Again lots of text scrolling by.

http://home.comcast.net/~linuxboy/source18.jpg

Now I again clear the screen, and run:
make clean which cleans up all the temporary files and such.

http://home.comcast.net/~linuxboy/source19.jpg

Guess what... more text scrolling by (Ha! Ha! Ha!)

http://home.comcast.net/~linuxboy/source20.jpg

see next post

debtboy 31. May 2009 11:26 PM

Now lets see if it works,
exit root, making your the regular user.
Type conky and hit enter to see if it works.

A display of PC information should appear on your desktop.

http://home.comcast.net/~linuxboy/source21.jpg

To end the program I just enter <ctrl> c in the shell.

http://home.comcast.net/~linuxboy/source22.jpg

The conky program can be configured to run many different ways,
(I think, this is the first I've used it)
but this post was about installing from source not how to use conky.

It's not difficult to install from source, here is a summary:

1.) download tarball (*.tar.gz)
2.) unarchive using tar -xvf filename
3.) Enter directory and read README (possible special instructions)
4.) run ./configure
5.) switch to root
6.) run make
7.) run make install
8.) run make clean optional

No big deal, it's easy.

make uninstall to remove it, provided you kept your makefile
For info on make, check the man pages.

I've left out minor details and such as this was only
an introduction. Hope it was easy to understand.

This thread went over some of the basics to get you started,
now it's fun time!! :D

wdhpr 02. Jun 2009 01:37 AM

Great tutorial
 
This was going really great until the ./configure part. I then got this error

Quote:

checking for X... no
configure: error: Can't locate your X11 installation
Jac@mepis1:~/Desktop/conky-1.7.0$
I am using mepis and only have the basic x11 package installed. Looked for the x installation pkg. thinking it might be a x package i could install. No joy :(
I will try to install another source package

PS again.........great tutorial :)
Cheers
Wdhpr

debtboy 02. Jun 2009 02:17 AM

Quote:

Originally Posted by wdhpr (Post 5990)
This was going really great until the ./configure part. I then got this error



I am using mepis and only have the basic x11 package installed. Looked for the x installation pkg. thinking it might be a x package i could install. No joy :(
I will try to install another source package

PS again.........great tutorial :)
Cheers
Wdhpr

Wow, sorry to hear that.
You are right about the x package, but it is a development library you need.
I'm not familiar with Mepis, but you should be able to install the needed library through synaptic.
It will have (x or x11 or xorg or libx) and (devel or develop or dev) in the name.

NOTE:
When things break or don't work is when we learn the most! ;)

wdhpr 02. Jun 2009 11:25 PM

Hey guy

Its hard trying encompass all the variables when writing things like this. Its like trying to make something human proof and knowing its impossible. I understand the library part of your response. Again not too different from Amiga's library requirements. I sometimes wonder if any of Amiga's scripting was used in the development of the Linux kernel.


Cheers
Wdhpr

debtboy 03. Jun 2009 01:00 AM

Well, packages do simplify installs and if you get a large full blown distro
most everything you'll need will already be included.
Just install as needed via package manger.

This was only a How-To with screenshots,
showing that you can install apps directly from source code.

There doesn't seen to be much activity here in the
Linux portion of the forum. :confused:

Twenty years from now people will laugh, saying...
These were the horrible years of,
Windows Operating Systems :eek: and Rap music :eek:


All times are GMT +1. The time now is 09:05 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.