APPENDIX C

image

Raspbian apt Commands

This appendix highlights the usage of commonly used package management commands under Raspbian Linux.

List Available Packages

$ apt–cache pkgnames
tesseract−ocr−epo
pipenightdreams
openoffice.org−l10n−mn
mumudvb
tbb−examples
libsvm−java
libsalck3−dev
libboost−timer1.50−dev
snort−rules−default
freediams−doc−fr
...

List Installed Packages

$ dpkg -l
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name         Version        Architecture    Description
+++ -=========== -============= -============-  ==========================
ii  adduser      3.113+nmu3     all             add and remove users and groups
ii  alsa-base    1.0.25+2+nmu2  all             ALSA driver configuration files
ii  alsa–utils   1.0.25-3       armhf           Utilities for configuring and  using ALSA
ii  apt          0.9.7.6+rpi1   armhf           commandline package manager
ii  apt–utils    0.9.7.6+rpi1   armhf           package managment related
                                                utility programs

List Files for Package

$dpkgL apt
/.
/etc
/etc/cron.daily
/etc/cron.daily/apt
/etc/logrotate.d
/etc/logrotate.d/apt
/etc/apt
/etc/apt/apt.conf.d
/etc/apt/apt.conf.d/01autoremove
/etc/apt/preferences.d
...

Perform Package Search

$ apt-cache search gnuplot
...
devscripts - scripts to make the life of a Debian Package maintainer easier
gnuplot - Command -line driven interactive plotting program
gnuplot-doc - Command -line driven interactive plotting program. Doc-package
gnuplot-mode - Yet another Gnuplot mode for Emacs
gnuplot-nox - Command-line driven interactive plotting program. No-X package
gnuplot-qt - Command-line driven interactive plotting program. QT-package
gnuplot-x11 - Command-line driven interactive plotting program. X-package
libchart-gnuplot -perl - module for generating two - and three-dimensional plots
libgnuplot-ocaml -dev - OCaml interface to the gnuplot utility
libgnuplot-ruby - Transitional package for ruby-gnuplot
libgnuplot-ruby1 .8 - Transitional package for ruby-gnuplot
libgraphics-gnuplotif-perl - dynamic Perl interface to gnuplot
libploticus0 - script driven business graphics library
libploticus0-dev - Development files for the ploticus library
...

Install a Package

$ sudo apt-get install gnuplot-x11
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
      libglu1-mesa liblua5.1-0 libwxbase2.8-0 libwxgtk2.8-0
Suggested packages:
      gnuplot-doc libgnomeprintui2.2-0
The following NEW packages will be installed:
      gnuplot-x11 libglu1-mesa liblua5.1-0  libwxbase2.8-0  libwxgtk2.8-0
0 upgraded, 5 newly installed, 0 to remove and 107 not upgraded.
Need to get 4,967 kB of archives.
After this operation, 12.4 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http :// mirrordirector.raspbian.org/raspbian/ wheezy/main libglu1-mesa armhf 8.0.5-3 [152 kB]
Get:2 http :// mirrordirector.raspbian.org/raspbian/ wheezy/main liblua5.1-0 armhf 5.1.5-4 [145 kB]
Get:3 http :// mirrordirector.raspbian.org/raspbian/ wheezy/main libwxbase2.8-0 armhf 2.8.12.1-12 [599 kB]
Get:4 http :// mirrordirector.raspbian.org/raspbian/ wheezy/main libwxgtk2.8-0 armhf 2.8.12.1-12 [3 ,011 kB]
Get:5 http :// mirrordirector.raspbian.org/raspbian/ wheezy/main gnuplot-x11 armhf 4.6.0-8 [1 ,059 kB]
Fetched 4,967 kB in 12s (408 kB/s)
Selecting previously unselected package libglu1-mesa:armhf.
(Reading database ... 60788 files and directories currently installed .)

Unpacking libglu1 -mesa:armhf (from .../libglu1-mesa_8.0.5-3 _armhf.deb) ...
Selecting previously unselected package liblua5.1-0: armhf.
Unpacking liblua5.1-0: armhf (from .../liblua5.1-0_5.1.5-4 _armhf.deb) ...
Selecting previously unselected package libwxbase2.8-0: armhf.
Unpacking libwxbase2.8-0: armhf (from .../libwxbase2.8-0_2.8.12.1-12_armhf.deb) ...
Selecting previously unselected package libwxgtk2.8-0: armhf.
Unpacking libwxgtk2.8-0: armhf (from .../libwxgtk2.8-0_2.8.12.1-12_armhf.deb) ...
Selecting previously unselected package gnuplot-x11.
Unpacking gnuplot-x11 (from .../gnuplot-x11_4.6.0-8_armhf.deb) ...
Processing triggers for menu ...
Processing triggers for man-db ...
Setting up libglu1-mesa:armhf (8.0.5-3) ...
Setting up liblua5.1-0:armhf (5.1.5-4) ...
Setting up libwxbase2.8-0:armhf (2.8.12.1-12) ...
Setting up libwxgtk2.8-0:armhf (2.8.12.1-12) ...
Setting up gnuplot-x11 (4.6.0-8) ...
Processing triggers for menu ...
$

Remove a Package

# aptget remove pkg_name
# aptget purge pkg_name

Install Updates

# aptget update

Upgrade

# aptget upgrade

Obtain Kernel Sources

$ wget −−nocheckcertificate 
  −O raspberrypi–linux3.6.11.tar.gz
  http://github.com/raspberrypi/linux/tarball/rpi3.6.y
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.148.102.90