Install latest smplayer on Debian

add-apt-repository ppa:rvm/smplayer
apt-get update
apt-get install smplayer smtube smplayer-themes

 


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Find all Deb packages currently installed

The following is a very useful command, esp before doing an upgrade:

dpkg --get-selections "*"

The following is a brief summary of the listing:

xserver-xorg-video-cirrus                       install
xserver-xorg-video-fbdev                        install
xserver-xorg-video-geode                        install
xserver-xorg-video-i128                         install
xserver-xorg-video-i740                         install
xserver-xorg-video-intel                        install
xserver-xorg-video-mach64                       install
xserver-xorg-video-mga                          install
xserver-xorg-video-neomagic                     install
xserver-xorg-video-nouveau                      install
xserver-xorg-video-nv                           install
xserver-xorg-video-openchrome                   install
xserver-xorg-video-r128                         install
xserver-xorg-video-radeon                       install
xserver-xorg-video-rendition                    install
xserver-xorg-video-s3                           install
xserver-xorg-video-s3virge                      install
xserver-xorg-video-savage                       install
xserver-xorg-video-siliconmotion                install
xserver-xorg-video-sis                          install
xserver-xorg-video-sisusb                       install
xserver-xorg-video-tdfx                         install
xserver-xorg-video-trident                      install
xserver-xorg-video-tseng                        install
xserver-xorg-video-vesa                         install
xserver-xorg-video-vmware                       install
xserver-xorg-video-voodoo                       install
xsltproc                                        install
xterm                                           install
xtrans-dev                                      install
xulrunner-1.9.1                                 deinstall
xxdiff                                          install
xz-utils                                        install
yelp                                            install
zip                                             install
zlib1g                                          install
[[email protected] droidzone]#

 


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Debian apt-get broken packages

I tried to reinstall startup-manager recently after aptitude auto uninstalled it, and got the following error:

[[email protected] droidzone]#sudo apt-get install startupmanager
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 initscripts : Breaks: console-setup (< 1.74) but 1.68+squeeze2 is to be installed
               Breaks: nfs-common (< 1:1.2.5-3) but 1:1.2.2-4squeeze2 is to be installed
 keyboard-configuration : Breaks: console-setup (< 1.71) but 1.68+squeeze2 is to be installed
 startupmanager : Depends: python-glade2 (>= 2.12) but it is not going to be installed
                  Depends: python-gnome2 (>= 2.20) but it is not going to be installed
                  Depends: yelp but it is not going to be installed
E: Broken packages

I took a look at my apt sources list and found that as suggested I had updated the sources list to include the sid repos, which apparently did not have all the correct packages. So I commented out a few lines and fixed it.

# deb cdrom:[Debian GNU/Linux 6.0.4 _Squeeze_ - Official Snapshot i386 LIVE/INSTALL Binary 20120129-12:44]/ squeeze main

#deb cdrom:[Debian GNU/Linux 6.0.4 _Squeeze_ - Official Snapshot i386 LIVE/INSTALL Binary 20120129-12:44]/ squeeze main

#deb http://security.debian.org/ squeeze/updates main
#deb-src http://security.debian.org/ squeeze/updates main

#Additions come below:

#For module-assistant and nvidia-kernel-common
#deb http://ftp.de.debian.org/debian squeeze main contrib non-free
#deb http://ppa.launchpad.net/jtaylor/keepass/ubuntu lucid main
deb http://ftp.us.debian.org/debian stable main contrib non-free
#deb http://ftp.us.debian.org/debian sid main contrib non-free
#deb http://ppa.launchpad.net/shutter/ppa/ubuntu lucid main
#deb http://ppa.launchpad.net/echidnaman/qapt/ubuntu lucid main

The only line I left is:

deb http://ftp.us.debian.org/debian stable main contrib non-free

Followed by:

[[email protected] droidzone]#sudo apt-get update
Hit http://ftp.us.debian.org stable Release.gpg   
Ign http://ftp.us.debian.org/debian/ stable/contrib Translation-en
Ign http://ftp.us.debian.org/debian/ stable/contrib Translation-en_IN
Ign http://ftp.us.debian.org/debian/ stable/main Translation-en
Ign http://ftp.us.debian.org/debian/ stable/main Translation-en_IN
Ign http://ftp.us.debian.org/debian/ stable/non-free Translation-en
Ign http://ftp.us.debian.org/debian/ stable/non-free Translation-en_IN
Hit http://ftp.us.debian.org stable Release
Hit http://ftp.us.debian.org stable/main i386 Packages
Hit http://ftp.us.debian.org stable/contrib i386 Packages
Hit http://ftp.us.debian.org stable/non-free i386 Packages
Reading package lists... Done
[[email protected] droidzone]#sudo apt-get install startupmanager
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  gnome-user-guide libwebkit-1.0-2 python-gnome2 yelp
Suggested packages:
  python-gnome2-doc
The following NEW packages will be installed:
  gnome-user-guide libwebkit-1.0-2 python-gnome2 startupmanager yelp
0 upgraded, 5 newly installed, 0 to remove and 93 not upgraded.
Need to get 5,513 kB/21.6 MB of archives.
After this operation, 60.5 MB of additional disk space will be used.
Do you want to continue [Y/n]? y

 


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

List dependencies of a package (Debian)

sudo dpkg-query -p ‘packagename’

Eg:

[[email protected] man]$ sudo dpkg-query -p 'empathy'
Package: empathy
Priority: optional
Section: gnome
Installed-Size: 4453
Maintainer: Ubuntu Core Developers 
Architecture: i386
Version: 3.4.1-0ubuntu1
Replaces: libempathy-gtk-common
Depends: libc6 (>= 2.7), libcanberra-gtk3-0 (>= 0.25), libcanberra0 (>= 0.2), libdbus-glib-1-2 (>= 0.88), libebook-1.2-12 (>= 3.2.3), libenchant1c2a (>= 1.6), libfarstream-0.1-0 (>= 0.1.1), libfolks-telepathy25 (>= 0.6.6), libfolks25 (>= 0.6.2), libgcr-3-1 (>= 2.91.4), libgdk-pixbuf2.0-0 (>= 2.22.0), libgee2 (>= 0.5.0), libglib2.0-0 (>= 2.31.8), libgnome-keyring0 (>= 3.2.2-2~), libgnutls26 (>= 2.12.6.1-0), libgoa-1.0-0 (>= 3.3.0), libgstreamer-plugins-base0.10-0 (>= 0.10.31), libgstreamer0.10-0 (>= 0.10.32), libgtk-3-0 (>= 3.3.6), libgudev-1.0-0 (>= 147), libido3-0.1-0 (>= 0.1.8), liblaunchpad-integration-3.0-1 (>= 0.1.17), libmission-control-plugins0 (>= 1:5.5.4), libnm-glib4 (>= 0.7.999), libnotify4 (>= 0.7.0), libpango1.0-0 (>= 1.18.0), libpulse-mainloop-glib0 (>= 1:0.99.1), libpulse0 (>= 1:0.99.1), libsoup2.4-1 (>= 2.4.0), libtelepathy-farstream2 (>= 0.2.1), libtelepathy-glib0 (>= 0.17.5), libtelepathy-logger2 (>= 0.2.10), libunity9 (>= 3.4.6), libwebkitgtk-3.0-0 (>= 1.3.10), libx11-6, libxml2 (>= 2.7.4), dconf-gsettings-backend | gsettings-backend, empathy-common (= 3.4.1-0ubuntu1), telepathy-mission-control-5 (>= 5.11.0), gsettings-desktop-schemas, gnome-icon-theme (>= 2.30.0), telepathy-logger, dbus-x11
Recommends: telepathy-gabble, telepathy-salut, gvfs-backends, nautilus-sendto-empathy, telepathy-haze, telepathy-indicator
Suggests: vino, empathy-call, telepathy-idle
Size: 1483852
Description: GNOME multi-protocol chat and call client
 Instant messaging program supporting text, voice, video, file transfers
 and inter-application communication over many different protocols,
 including: AIM, MSN, Google Talk (Jabber/XMPP), Facebook, Yahoo!, Salut,
 Gadu-Gadu, Groupwise, ICQ and QQ.
 .
 This package contains the Empathy IM application and account manager.
Homepage: http://live.gnome.org/Empathy
Original-Maintainer: Debian Telepathy maintainers 
[[email protected] man]$

APT and Dpkg Quick Reference Sheet

Matthew Danish
Common APT usage

apt-get install Downloads and all of its dependencies, and installs or upgrades them. This will also take a package off of hold if it was put on. See below for more info on hold.

apt-get remove [–purge] Removes and any packages that depend on it. –purge specifies that packages should be purged, see dpkg -P for more information.

apt-get update Updates packages listings from Debian mirrors, should be run at least once a day if you install anything that day, and every time after /etc/apt/sources.list is changed.

apt-get upgrade [-u] Upgrades all packages installed to newest versions available. Will not install new or remove old packages. If a package changes dependencies and requires installation of a new package, it will not be upgraded, it will be put on hold instead. apt-get upgrade will not upgrade packages put on hold (that is the meaning of hold). See below for how to manually put packages on hold. I suggest the `-u’ option as well, because then you can see what packages are going to be upgraded.

apt-get dist-upgrade [-u] Similar to apt-get upgrade, except that dist-upgrade will install or remove packages to satisfy dependencies.

apt-cache search Searches packages and descriptions for .

apt-cache show Shows the full description of .

apt-cache showpkg Shows a lot more detail about , and its relationships to other packages.

dselect
console-apt
aptitude
gnome-apt Graphical front ends to APT (some of these may be in their own package, that must be installed before use). While dselect is arguably the most powerful, it’s also the oldest and hardest to use.

Common Dpkg usage

dpkg -i Installs a Debian package file; one that you downloaded manually, for example.

dpkg -c Lists the contents of , a .deb file.

dpkg -I Extracts package information from , a .deb file.

dpkg -r Removes an installed package named

dpkg -P Purges an installed package named . The difference between remove and purge is that while remove only deletes data and executables, purge also deletes all configuration files in addition.

dpkg -L Gives a listing of all the files installed by . See also dpkg -c for checking the contents of a .deb file.

dpkg -s Shows information on the installed package . See also apt-cache show for viewing package information in the Debian archive and dpkg -I for viewing package information extracted from a .deb file.

dpkg-reconfigure Reconfigures an installed package, if it uses debconf (debconf provides that consistent configuration interface for package installation). You can reconfigure debconf itself if you want to change the front-end or priority of questions asked. For example, to reconfigure debconf with the dialog front-end, you simply run:
dpkg-reconfigure –frontend=dialog debconf

echo “ hold” | dpkg –set-selections Put on hold (command line method)

dpkg –get-selections “” Get the current status of (command line method)

dpkg -S Searches for in package database, telling you which packages have that file in them.

Building Debian packages from Source

apt-get source [-b] Download the source Debian package for and extract it. You must have deb-src lines in your /etc/apt/sources.list for this to work. If you supply the `-b’ option and you are currently root, then the package will be automatically built if possible.

apt-get build-dep Download and install the packages necessary to build the source Debian package . This feature is only present in apt version 0.5 and up. Currently this means that woody and above contain this functionality. If you have an older version of apt then the easiest way to find out the build dependencies is to look in the debian/control file in the source package directory. A common usage of this command is in conjunction with apt-get source -b. For example (as root):
apt-get build-dep
apt-get source -b
Will download the source package, all of its build dependencies, and attempt to compile the source package.

dpkg-source -x If you have downloaded the source package for a program manually, which includes several files such as a .orig.tar.gz (or .tar.gz if it is Debian native), a .dsc, and a .diff.gz (if it is not Debian native), then you can unpack the source package using this command on the .dsc file.

dpkg-buildpackage Builds a Debian package from a Debian source tree. You must be in the main directory of the source tree for this to work. Sample usage:
dpkg-buildpackage -rfakeroot -uc -b
Where `-rfakeroot’ instructs it to use the fakeroot program to simulate root privileges (for ownership purposes), `-uc’ stands for “Don’t cryptographically sign the changelog”, and `-b’ stands for “Build the binary package only”

debuild A handy wrapper script around dpkg-buildpackage that will automatically take care of using fakeroot or not, as well as running lintian and gpg for you.

Fixing dependencies

dpkg –configure –pending If dpkg quits with an error while apt-get install, upgrade, or dist-upgradeing try running this to configure the packages that were already unpacked. Then try apt-get install, upgrade, or dist-upgrade -f, and then try apt-get install, upgrade, or dist-upgrade again. Repeat as needed. This usually resolves most dependency problems (also, if it mentions a specific package for some reason, you might want to try installing or removing that package)

apt-get install -f
apt-get upgrade -f
apt-get dist-upgrade -f Attempt to fix dependencies while doing one of the above. Note that apt-get install -f does not require a argument.


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Searching for a package

Many a time, we know a part of an app we’re searching for, but dont know the exact package name. Did you know that apt (as does portage) has a command for listing a list of packages (from its cache) based on a regex search?

apt-cache search 'regex query'[/code]

This searches the package names and description for a match

If you'd like to search the package name and file lists alone, use:

dpkg -S 'regex query'[/code]

Installing package from source:
Note that you need to install a few packages like dpkg-dev to build packages from source.

sudo apt-get install dpkg-dev dh-autoreconf autopoint intltool gettext libglib2.0-dev libslang2-dev libx11-dev e2fslibs-dev check libgpm-dev[/code]

To download a source package, you would use the following command:

$ apt-get source packagename

This will download three files: a .orig.tar.gz, a .dsc and a .diff.gz. In the case of packages made specifically for Debian, the last of these is not downloaded and the first usually won't have "orig" in the name.

The .dsc file is used by dpkg-source for unpacking the source package into the directory packagename-version. Within each downloaded source package there is a debian/ directory that contains the files needed for creating the .deb package.

To auto-build the package when it's been downloaded, just add -b to the command line, like this:

$ apt-get -b source packagename
If you decide not to create the .deb at the time of the download, you can create it later by running:

$ dpkg-buildpackage -rfakeroot -uc -b
from within the directory that was created for the package after downloading. To install the package built by the commands above one must use the package manager directly, like this:

# dpkg -i file.deb


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Removing a ppa added with apt-get-repository

Removing a repo:

You can remove them by deleting .list files from 

/etc/apt/sources.list.d[/code] directory or remove it with the --remove flag to the same command you used to add it:

sudo add-apt-repository --remove ppa:whatever/ppa[/code]

If a .deb file was installed:

sudo ppa-purge ppa:repository-name/subdirectory[/code]


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.
Add a custom repository

Add a custom repository

The ppa name is :

ppa:gwibber-daily/ppa

 

Adding the PPA to Ubuntu 9.10 (Karmic) and later

If you’re using the most recent version of Ubuntu (or any version from Ubuntu 9.10 onwards), you can add a PPA to your system with a single line in your terminal.

 

Step 1: On the PPA’s overview page, look for the heading that reads Adding this PPA to your system. Make a note of the PPA’s location, which looks like:

 

ppa:gwibber-daily/ppa[/code]

 

 

Step 2: Open a terminal and enter:

 

sudo add-apt-repository ppa:user/ppa-name[/code]

 

Replace 

ppa:user/ppa-name[/code] with the PPA's location that you noted above.

 

 

Screen shot of a terminal with the sudo add-apt-repoistory line

 

 

Your system will now fetch the PPA's key. This enables your Ubuntu system to verify that the packages in the PPA have not been interfered with since they were built.

 

 

Screen shot of a system retrieving the PPA details

 

 

Step 3: Now, as a one-off, you should tell your system to pull down the latest list of software from each archive it knows about, including the PPA you just added:

sudo apt-get update[/code]

Now you're ready to start installing software from the PPA!


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.