LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 10-11-2007, 09:25 PM   #1
magicdot
LQ Newbie
 
Registered: Aug 2007
Posts: 17

Rep: Reputation: 0
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!
 
Old 10-11-2007, 09:42 PM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
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.
 
Old 10-11-2007, 09:44 PM   #3
lionround
LQ Newbie
 
Registered: Oct 2007
Location: Memphis, TN
Distribution: Ubuntu Feisty Fawn 7.04
Posts: 19

Rep: Reputation: 0
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.
 
Old 10-11-2007, 09:46 PM   #4
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 5, Linux Lite
Posts: 4,312

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

Last edited by {BBI}Nexus{BBI}; 10-11-2007 at 09:54 PM. Reason: Added extra command
 
Old 10-11-2007, 10:19 PM   #5
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
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)

Last edited by farslayer; 10-11-2007 at 10:21 PM.
 
Old 10-11-2007, 10:22 PM   #6
magicdot
LQ Newbie
 
Registered: Aug 2007
Posts: 17

Original Poster
Rep: Reputation: 0
[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..

Last edited by magicdot; 10-11-2007 at 10:41 PM.
 
Old 10-11-2007, 10:40 PM   #7
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
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
 
Old 10-11-2007, 11:01 PM   #8
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
[QUOTE=magicdot;2921493]
Quote:
Originally Posted by matthewg42 View Post
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.
 
Old 10-11-2007, 11:26 PM   #9
SilentSam
Member
 
Registered: Aug 2007
Location: Ottawa
Distribution: Arch Linux/Kubuntu/OpenSUSE
Posts: 300

Rep: Reputation: 37
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.

Last edited by SilentSam; 10-11-2007 at 11:30 PM.
 
Old 10-11-2007, 11:52 PM   #10
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
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
 
Old 10-12-2007, 06:05 AM   #11
magicdot
LQ Newbie
 
Registered: Aug 2007
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by SilentSam View Post
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.
 
Old 10-12-2007, 06:47 AM   #12
magicdot
LQ Newbie
 
Registered: Aug 2007
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by farslayer View Post
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>"?

Last edited by magicdot; 10-12-2007 at 07:01 AM.
 
Old 10-12-2007, 08:04 AM   #13
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
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.

Last edited by farslayer; 10-12-2007 at 08:05 AM.
 
Old 10-12-2007, 08:23 AM   #14
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
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.
 
Old 10-12-2007, 09:17 AM   #15
magicdot
LQ Newbie
 
Registered: Aug 2007
Posts: 17

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by matthewg42 View Post
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.
 
  


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
HDD partition lost. xandros DVD + me = lost data lein Linux - General 18 05-22-2007 05:47 AM
Bind have lost some zone in named.conf & lost db file achilles Linux - Enterprise 0 04-19-2007 06:22 AM
Lost boot drive, howto reinstall from backups w/ apt? jdavidow Debian 0 02-24-2007 04:57 AM
Howto recover lost and formatted data on lost partitions. Sören Schneider LinuxQuestions.org Member Success Stories 2 04-05-2006 06:38 AM
power lost from cable modem, interface lost a10392 Linux - Networking 4 11-16-2004 09:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:16 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration