Ubuntu: Difference between revisions

From Hackepedia
Jump to navigationJump to search
No edit summary
No edit summary
Line 17: Line 17:


  $ sudo apt-get install manpages-dev
  $ sudo apt-get install manpages-dev
== Sound ==
$ aplay -l
If it lists your card, awesome. Instead, mine showed:
  aplay: device_list:205: no soundcards found...
so on to the next step:
$ lspci -v
Hopefully you see an Audio device: entry. In my case I saw:
00:10.1 Audio device: nVidia Corporation MCP51 High Definition Audio (rev a2)
Subsystem: Dell Unknown device 01f4
Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 11
Memory at fe024000 (32-bit, non-prefetchable) [size=16K]
So I just need the proper module installed:
$ sudo apt-get install [[Variables|linux-ubuntu-modules-2.6.22-14-386]]
Replace 2.6.22 with the kernel you are using.
$ modprobe [[Variables|snd-hda-intel]]
Replace snd-hda-intel with the driver for your sound card.
My sound now works!

Revision as of 21:49, 19 September 2008

I was trying to compile hello world in C:

$ gcc -Wall -o hello hello.c 
hello.c:1:19: error: stdio.h: No such file or directory
hello.c: In function ‘main’:
hello.c:5: warning: implicit declaration of function ‘printf’
hello.c:5: warning: incompatible implicit declaration of built-in function ‘printf’

If you plan on doing any programming on ubuntu:

$ sudo apt-get install build-essential

This will install libc-dev, gcc, g++, make and dpkg-dev for C and/or C++ programming. If you intend on programming, you will probably want the development man pages installed. For example, I couldn't find the simple functions:

$ man scanf
No manual entry for scanf
$ sudo apt-get install manpages-dev


Sound

$ aplay -l

If it lists your card, awesome. Instead, mine showed:

 aplay: device_list:205: no soundcards found...

so on to the next step:

$ lspci -v 

Hopefully you see an Audio device: entry. In my case I saw:

00:10.1 Audio device: nVidia Corporation MCP51 High Definition Audio (rev a2)

Subsystem: Dell Unknown device 01f4 Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 11 Memory at fe024000 (32-bit, non-prefetchable) [size=16K]

So I just need the proper module installed:

$ sudo apt-get install linux-ubuntu-modules-2.6.22-14-386

Replace 2.6.22 with the kernel you are using.

$ modprobe snd-hda-intel

Replace snd-hda-intel with the driver for your sound card.

My sound now works!