Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Monday, August 8, 2011

Package search tools: "provided by" and "what provides"

Ubuntu community help forum has a nice page if you need to be reminded how to search files provided by a particular package.

dpkg -L will show you what files came with an installed package

apt-file, which needs to be installed first, will tell you what package provides a given file.  Actually, it can also replicate the same thing that dpkg -L does, see below:
$ dpkg -L picard-tools
/.
/usr
/usr/bin
/usr/bin/picard-tools
/usr/share
/usr/share/java
/usr/share/java/picard-1.27.jar
/usr/share/picard-tools
/usr/share/picard-tools/explain_sam_flags.py
/usr/share/doc
/usr/share/doc/picard-tools
/usr/share/doc/picard-tools/copyright
/usr/share/doc/picard-tools/README.Debian
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/picard-tools.1.gz
/usr/share/java/picard.jar

$ apt-file search picard.jar
picard-tools: /usr/share/java/picard.jar

$ apt-file list picard-tools
picard-tools: /usr/bin/picard-tools
picard-tools: /usr/share/doc/picard-tools/README.Debian
picard-tools: /usr/share/doc/picard-tools/copyright
picard-tools: /usr/share/java/picard-1.27.jar
picard-tools: /usr/share/java/picard.jar
picard-tools: /usr/share/man/man1/picard-tools.1.gz
picard-tools: /usr/share/picard-tools/explain_sam_flags.py


Addendum: If you need to know what repository provides a specific package, use apt-cache showpkg:
$ apt-cache showpkg picard-tools
Package: picard-tools
Versions:
1.27-1 (/var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_natty_universe_binary-amd64_Packages) (/var/lib/dpkg/status)
 Description Language:
                 File: /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_natty_universe_binary-amd64_Packages
                  MD5: 5ece67d6a9fa35d5b4adc3567de3557b


Reverse Depends:
  med-bio,picard-tools
  libsam-java,picard-tools
Dependencies:
1.27-1 - openjdk-6-jre (16 (null)) java-runtime (0 (null)) libsam-java (2 1.27-1) python (0 (null)) r-base-core (0 (null))
Provides:
1.27-1 -
Reverse Provides:



Monday, December 15, 2008

How to get the BioConductor packages to install correctly in Ubuntu 8.10

Apparently, the repositories for the 8.10 (Intrepid Ibex) release of Ubuntu do not completely specify all of the dependencies for the R-base synaptic package.

I could not get various packages to compile, until I installed

sudo apt-get install libxml2-dev libatlas-base-dev

This solved many build problems, including package XML, but I was still getting the following error when attempting to load library vsn:

> library(vsn)
Loading required package: lattice
Loading required package: Biobase
Loading required package: tools

Welcome to Bioconductor

Vignettes contain introductory material. To view, type
'openVignette()'. To cite Bioconductor, see
'citation("Biobase")' and for packages 'citation(pkgname)'.

Loading required package: affy
Loading required package: affyio
Loading required package: preprocessCore
Loading required package: limma
Error in inherits(x, "factor") : attempt to apply non-function
Error : .onLoad failed in 'loadNamespace' for 'vsn'
Error: package/namespace load failed for 'vsn'

Got it to work finally! I replaced the atlas lib mentioned above with libatlas3gf-sse2 (specific for newer processors) and also updated all of my bioconductor packages as follows:
source("http://bioconductor.org/biocLite.R")
update.packages(repos=biocinstallRepos(), ask=FALSE)

-----------
references:
https://stat.ethz.ch/pipermail/r-help/2008-December/181390.html
http://ubuntuforums.org/showthread.php?t=717069