LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   What are packages? (https://www.linuxquestions.org/questions/linux-newbie-8/what-are-packages-702740/)

QueenZ 02-06-2009 09:17 AM

What are packages?
 
Windows user here. I've seen packages in linux so many times.. I don't see this word in windows. What does it mean? And what are they? Why do i see this word in linux so often but don't in windows?

camorri 02-06-2009 09:24 AM

A package is a set of files to install an application. There will be a Package Manager program on the system to install the 'package'.

Quote:

Why do i see this word in linux so often but don't in windows?
It is just a term for a collection of files. It is in a specific format so the package manager can install it correctly.

Packages are specific to a distribution. You would not try to install a Ubuntu package on a Mandriva system, or visa, versa.

jdkaye 02-06-2009 09:33 AM

Hi QueenZ,
Nobody says it better than Wiki so I'll quote them
Quote:

Linux distributions are normally segmented into packages. Each package contains a specific application or service. Examples of packages include a library for handling the PNG image format, a collection of fonts, or a web browser.
So basically they are units of software that you download and install on your linux box. How they are formatted and handled is one of the main differences among various linux distros.
cheers,
jdk

QueenZ 02-07-2009 10:09 AM

oh.. and so Package Manager is just a program that all package file extnsions are associated to? Like Package.pkg and Package Manager will open it and install the package?

jdkaye 02-07-2009 10:27 AM

Quote:

Originally Posted by QueenZ (Post 3435207)
oh.. and so Package Manager is just a program that all package file extnsions are associated to? Like Package.pkg and Package Manager will open it and install the package?

Yeah, that's about it. Package managers are called things like "yum" or "aptitude". The extensions I know about are .deb (for Debian or Debian-based distros) or .rpm (for Fedora, Suse, etc.).
cheers,
jdk

QueenZ 02-07-2009 10:39 AM

Yum and Aptitude are 2 programs (installers) right?

But why can't it be like in windows where there is just one .exe file and there is no need for other installer programs..

camorri 02-07-2009 12:24 PM

Quote:

But why can't it be like in windows where there is just one .exe file and there is no need for other installer programs
Each distro is a custom version of linux. In fact a distro is a linux kernel plus a lot of other linux programs. The installer may check for pre-req's ( or may not ). Each distro tests to a greater, or lesser degree compatibility. If you look into the code, you will find various releases of every component that exists. So the distro people have to decide what release of each piece of the package will work with the application that is to be installed. They bundle the pieces into a package.

Part of what is different between windoze and linux, is linux code tends to get written once. Then if an application needs the function of another piece of code, the original code is used, they don't re-write a new version of the same code. Windoze on the other hand, the code is developed my a company wanting to be paid for their effort. So they write the whole thing, don't share the code, even if much of the same code exists elsewhere. The wheel keeps getting re-invented. So the windoze writers create a new program, and put it in one .exe self installing file.

Each distro has its own philosophy. You can do what you want with it. Micro$ dictates how code there will be set up.

Beyond packages, you can get the source code. This allows you, if you want to alter a program, and then compile it, and install. You can literally change an application to your needs.

Windoze apps come as binary files only. You can not easily alter how the program functions. You can only change things through what configuration the creator intended.

Hope this helps.

jdkaye 02-07-2009 01:39 PM

Quote:

Originally Posted by QueenZ (Post 3435234)
Yum and Aptitude are 2 programs (installers) right?

But why can't it be like in windows where there is just one .exe file and there is no need for other installer programs..

Aha, my dear Watson. There isn't "just one .exe file". You can hide a lot of mischief in one .exe file. It's a bit like saying "just one tar.gz" file. That one file really is a bundle or package of many other files. So each windows .exe file that installs a new program is really another installer program.

Given the choice, I choose packages! :)

Once you get used to them, it will be hard to imagine any other way of doing things.

Have fun!
jdk

okos 02-07-2009 07:27 PM

Quote:

Originally Posted by QueenZ (Post 3435207)
oh.. and so Package Manager is just a program that all package file extnsions are associated to? Like Package.pkg and Package Manager will open it and install the package?

Not quite...
In the sense that you cannot necessarily download source code and expect the package manager to handle it.
Say you download <new file>.tar.gz, your package manager will not install it for you.

The package manager will manage the programs you have pre-installed and will install a new program using apt-get... in command line or the package manager gui.
From the gui (graphical user interface) in other words window, you can update the package manager and view the list of available packages. Debian /ubuntu have around 20,000 available packages for you to download and install on your system.
The package manager will also resolve dependency issues. Say your package requires a different package to run properly, the package manager will figure out all needed additional packages and install them also.

QueenZ 02-08-2009 03:43 AM

but what if there's no Package Manager in my distro??

brianL 02-08-2009 05:52 AM

Quote:

Originally Posted by QueenZ (Post 3435897)
but what if there's no Package Manager in my distro??

It's a while since I tried OpenSuse, but I'm positive it has a package manager and help files to tell you where it is and how to use it.

camorri 02-08-2009 05:56 AM

Quote:

but what if there's no Package Manager in my distro??
What distro would that be?

If there is no package manager, then it is up to you to find software on public locations like Sourceforge. You will find thousands of programs there in source format. Download them, compile them, and install them. It is up to the user in this case to look after dependencies.

okos 02-08-2009 02:09 PM

See the following links regarding installing using various package managers.
http://wiki.linuxquestions.org/wiki/Installing_Software

Great tutorial on installing from source.
http://www.linuxquestions.org/linux/...ms_from_Source


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