LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   apt-get.. i am so lost.. (https://www.linuxquestions.org/questions/linux-newbie-8/apt-get-i-am-so-lost-591199/)

magicdot 10-11-2007 09:25 PM

apt-get.. i am so lost..
 
So. I took the plunge. I'm here settin' on Xubuntu. I'm not asking much. I just wanna view videos, chat w/ my cam, and figure out WTF THIS IS DOING!?!

lol. I'm acutally much calmer then I sound.

Wait. Probably not. But.

I don't understand this apt-get stuff. I try to install stuff like AMSN and it says I don't have tcl. So, I figure out how to list and I get it. Then it says I don't have a compiler.. ..how in the devil are you supposed to know what you need/don't need?

I am so lost. Is there a guide somewhere that will 'splain all this? Thank god it automatically configured my network card so I can get to the 'net, or I'd be up Shit's Creek w/o a paddle!

matthewg42 10-11-2007 09:42 PM

apt-get is a command-line (terminal) interface to the packaging system. If you are not comfortable with that, you should probably use the GUI interface to the packaging system, Synaptic.

The basic concept is that Ubuntu have some servers with a lot of packages on, which you may download and install. To avoid duplication, a lot of functionality is put in shared libraries. As a consequence of this, any given program may rely on one or more libraries or other programs being installed.

Lucky for you, the packaging system handles this for you. When you install program a which relies on b, c and d, you will be asked, "installing a will install dependencies b, c and d, ok?

And you say yes and then wait a bit while the packaging system fetches everything and then installs it.

lionround 10-11-2007 09:44 PM

magicdot,

First of all, congrats on taking the plunge. I am new at this too, but it is turning out not to be as tough as I thought. There are a few things you need to know.

1. Almost everythi.ng you need to know is on this site -- somewhere. Use the search function.
2. When you ask questions, make the title something like, My mouse doesn't work all the time, not My Darn Mouse Tale.
3. Learn to use Synaptics Package Manager.
4. Install Webmin. It is a graphical representation/manager.

Keep on trying. Don't get frustrated and take it slow. It will come.

{BBI}Nexus{BBI} 10-11-2007 09:46 PM

Try: sudo apt-get install g++, or sudo apt-get install build-essential.

farslayer 10-11-2007 10:19 PM

Nexus has it right for the compiler environment with the build-essential command
I would also suggest reading the apt how-to http://www.debian.org/doc/manuals/apt-howto/

and since you are running Ubuntu I might also recommend the ubuntu guide. a most awesome FAQ/HOW-TO for getting Ubuntu configured and doing what you want.

http://ubuntuguide.org is the main site
http://xubuntuguide.org for xubuntu (very limited... Use guide above for most tasks)

magicdot 10-11-2007 10:22 PM

[QUOTE=matthewg42;2921468]apt-get is a command-line (terminal) interface to the packaging system. If you are not comfortable with that, you should probably use the GUI interface to the packaging system, Synaptic.

..but how does one know what packages to install? ..i'm fine w/ the command line (i'd sooner learn the command line anyway) but when i do a apt-cache search *whatever* there are so many options.. ..how does one know what is the appropriate one?

..like the TK GUI toolkit.. ..jezus. I thought myself smart, but this is giving me a run for my money.. ..I am so lost..

farslayer 10-11-2007 10:40 PM

I find the output of aptitude search <packagename> easier to follow when looking for a program..

So if I were searching for the VLC media player
Code:

debianetch:/$ aptitude search vlc
i A libvlc0                                        - multimedia player and streamer library
p  libvlc0-dev                                    - development files for VLC
i  mozilla-plugin-vlc                              - multimedia plugin for web browsers based on VLC
i  vlc                                            - multimedia player and streamer
i A vlc-nox                                        - multimedia player and streamer (without X support)
p  vlc-plugin-alsa                                - dummy transitional package
p  vlc-plugin-arts                                - aRts audio output plugin for VLC
p  vlc-plugin-esd                                  - Esound audio output plugin for VLC
p  vlc-plugin-ggi                                  - GGI video output plugin for VLC
p  vlc-plugin-glide                                - Glide video output plugin for VLC
p  vlc-plugin-sdl                                  - SDL video and audio output plugin for VLC
p  vlc-plugin-svgalib                              - SVGAlib video output plugin for VLC
p  wxvlc                                          - dummy transitional package

I see there is also a mozilla plugin for vlc so:

sudo apt-get install vlc mozilla-plugin-vlc

lleb 10-11-2007 11:01 PM

[QUOTE=magicdot;2921493]
Quote:

Originally Posted by matthewg42 (Post 2921468)
apt-get is a command-line (terminal) interface to the packaging system. If you are not comfortable with that, you should probably use the GUI interface to the packaging system, Synaptic.

..but how does one know what packages to install? ..i'm fine w/ the command line (i'd sooner learn the command line anyway) but when i do a apt-cache search *whatever* there are so many options.. ..how does one know what is the appropriate one?

..like the TK GUI toolkit.. ..jezus. I thought myself smart, but this is giving me a run for my money.. ..I am so lost..

there are a few ways to search.

one start with google as it will give you a better idea of what package to look for.

second, learn to use the GUI interface for starters until you get a hold of the naming scheme of Debian.

third is grep.

example:

apt-get -search kernel | grep 2.6.20

that should ONLY show you kernel packages with the 2.6.20 in their name.

the | allows you to string together more then 1 command.

grep is a search argument type command. so grep 123 will narrow a search down to something with 123 in it just like that. you can also use wild cards like * to search.

as far as setting up your web cam, that may or may not work. not all web cams are compatible with Linux. google for the type of camera and debian and see what you can find. you might find some HOWTO guides already built for that camera.

install the essentials as listed above and then poke around synaptec as it will give you a much simpler way to view all of the thousands of packages available for debian.

yes debian as that is what the *buntu line is forked from.

SilentSam 10-11-2007 11:26 PM

Normally apt-get resolves your dependencies for you. So if you were to type

$ sudo apt-get install amsn

for instance, apt-get will inform you that it's installing extra packages as well. There should be no need to hunt down tcl and the like, apt-get should do that for you.

So if you are being prompted that you don't have a compiler, nor tcl, how are you attempting to install amsn?

edit: Here is a log of what it says on my machine>

krizd@Kriz-Main:~$ sudo apt-get install amsn
Password:
Sorry, try again.
Password:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
docker imlib-base imlib11 sox tcl8.4 tcltls tk8.4
Suggested packages:
imlib-progs tclreadline
The following NEW packages will be installed:
amsn docker imlib-base imlib11 sox tcl8.4 tcltls tk8.4
0 upgraded, 8 newly installed, 0 to remove and 58 not upgraded.
Need to get 5225kB of archives.
After unpacking, 16.8MB of additional disk space will be used.
Do you want to continue [Y/n]?

(Yes I mistyped my password)

As you can see, apt-get resolves all my dependencies for me under extra packages.

matthewg42 10-11-2007 11:52 PM

You can search using the tools, or you can ask here for specific task-related programs. I find that as my experience increased, one of the most important sets of data I have slowly worked into my head is what programs/libraries do what.

Say what you'd like to achieve and we can suggest projects which might help. Once you know what project to search for, it's usually pretty easy to find a package for it.

Maybe an example would help. Lets say you want to create your own fonts. If you do:
Code:

apt-cache search font
You'll get way too many results to easily look through. This is where the super-useful program grep comes in handy. grep just filters lines which match some pattern. So how would you narrow down this big list of programs? Well, think of another term. Maybe "editor".
Code:

apt-cache search font |grep editor
That's better - 15 results. The forst one looks interesting:
Code:

fontforge - Font Editor for PS, TrueType and OpenType fonts
That's more or less the process I go through when I'm browsing the repos. Over the years you learn what is good for what.

By the way, if grepping for "editor" didn't narrow it down enough, you can do another grep on the output of the first with a different pattern. Adding the -i option makes the search case-insensitive:
Code:

apt-cache search font |grep editor |grep -i truetype

magicdot 10-12-2007 06:05 AM

Quote:

Originally Posted by SilentSam (Post 2921526)
Normally apt-get resolves your dependencies for you. So if you were to type

$ sudo apt-get install amsn

for instance, apt-get will inform you that it's installing extra packages as well. There should be no need to hunt down tcl and the like, apt-get should do that for you.

So if you are being prompted that you don't have a compiler, nor tcl, how are you attempting to install amsn?


..ack. ..I never tried to install it that way.. ..I d/led it from the site and it came w/ an "installer" which attempted to install it itself, but came back w/ errors of tcl not found. So for giggles I just tried running it like you suggested and I get: "Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?". (I did run "apt-get update" & tried again, but got the same error.)

LoL. ..I'm either in love w/ Linux or I'm gonna have to choke it. I'm not sure yet. I do know that the HD isn't grinding and whirling all day long like w/ Windoze -- so I'd hate to give it up.

magicdot 10-12-2007 06:47 AM

Quote:

Originally Posted by farslayer (Post 2921501)
I find the output of aptitude search <packagename> easier to follow when looking for a program..

So if I were searching for the VLC media player
Code:

debianetch:/$ aptitude search vlc
i A libvlc0                                        - multimedia player and streamer library
p  libvlc0-dev                                    - development files for VLC
i  mozilla-plugin-vlc                              - multimedia plugin for web browsers based on VLC
i  vlc                                            - multimedia player and streamer
i A vlc-nox                                        - multimedia player and streamer (without X support)
p  vlc-plugin-alsa                                - dummy transitional package
p  vlc-plugin-arts                                - aRts audio output plugin for VLC
p  vlc-plugin-esd                                  - Esound audio output plugin for VLC
p  vlc-plugin-ggi                                  - GGI video output plugin for VLC
p  vlc-plugin-glide                                - Glide video output plugin for VLC
p  vlc-plugin-sdl                                  - SDL video and audio output plugin for VLC
p  vlc-plugin-svgalib                              - SVGAlib video output plugin for VLC
p  wxvlc                                          - dummy transitional package

I see there is also a mozilla plugin for vlc so:

sudo apt-get install vlc mozilla-plugin-vlc


..wait.. How come when you do a search it comes out so neat and orderly?

..ok. ..so i just tried using the exact string you used. ..mine comes out nice and neat too.. ..then I used "apt-cache search mozilla" and it came up w/ tons of more stuff then "aptitude search mozilla". What's the difference?

..and how come you used the precurosor of "vlc" before "mozilla<etc>"?

farslayer 10-12-2007 08:04 AM

apt-cache search searches the package names and descriptions automatically.
aptitude search seems to only search the package names by default, so it returns fewer results.
Theres good and bad to both search methods. Perhaps the plugin I want for mozilla doesn't have mozilla in the package name.. I may not find it as easily with aptitude search as with grepping the output of apt-cache search.

Also notice the letters at the beginning of the lines when using aptitude search.
From the aptitude man page:
Code:

Each search result is listed on a separate line. The first
character of each line indicates the current state of the package:
the most common states are:

p, meaning that no trace of the package exists on the system,
c, meaning that the package was deleted but its configuration files remain on the system,
i, meaning that the package is installed, and
v, meaning that the package is virtual.

The second character indicates the stored  action (if any; otherwise a blank
space is displayed) to be performed on the package, with the most common actions being:

i, meaning that the package will be installed,
d, meaning that the package will be deleted, and
p, meaning that the package and its configuration files will be removed.

If the third character is A, the package was automatically installed.

That is a lot more informative than just a package search. I can quickly see what is already installed, and what else is available.

You can see fro mmy search that VLC and the plugin are installed, as well as 2 other packages that were Automatically installed as dependencies when I installed VLC.


vlc is a Video player
mozilla-plugin-vlc is a plugin for your browser so it can launch vlc when you click on a video link while browsing.
The command I posted installs both the player and the browser plugin.

matthewg42 10-12-2007 08:23 AM

In aptitude search, you can prefix the search term with a tilde (~) and a special letter to search in different parts of package descriptions. The most useful is ~d which dearches the description rather than the package name, e.g.
Code:

aptitude search ~dmozilla
Other modifier letters are documented here.

magicdot 10-12-2007 09:17 AM

Quote:

Originally Posted by matthewg42 (Post 2921878)
In aptitude search, you can prefix the search term with a tilde (~) and a special letter to search in different parts of package descriptions. The most useful is ~d which dearches the description rather than the package name, e.g.
Code:

aptitude search ~dmozilla
Other modifier letters are documented here.

ah. ..its starting to sink in. I should buy this whole community a beer and a shot. ;)


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