Translate

Archives

Add Adobe Flash to Firefox on Fedora 17

So you want to get Adobe Flash working on Firefox in Fedora 17? Here is a quick guide to doing it. Obviously you need root privileges to install the packages. First you need to install the appropriate repository (32-bit or 64-bit) for the Adobe RPM packages: # Adobe 32-bit x86 repository rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux # Adobe 64-bit x86_64 repository rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux If you cannot download these RPMs, check at Adobe for the latest version and download that. Then run yum to install the following packages: yum check-update yum install flash-plugin nspluginwrapper alsa-plugins-pulseaudio libcurl

List or Count Installed RPM Packages

If you are on a RPM-based Linux platform (such as Redhat, CentOS, Fedora, ArchLinux, Scientific Linux, etc.), here are two ways to determine the list of packages installed. Using yum: yum list installed Using rpm: rpm -qa You can also easily get a count of the installed packages by piping the output to wc: yum list installed | wc -l rpm -qa | wc -l

Set up local RPM Installation Repository

There are a number of ways of installing additional RPM packages from installation media. However, if your network is fast and you are installing the same packages on a number of systems, it sometimes is easier to set up a simple local package repository and use yum to install the packages from there. This post shows you how to do this. Copy the new packages, or even the contents of an entire distribution to a suitable subdirectory on a local webserver. For example, if you are using an Apache webserver on RHEL or Fedora, suitable locations would probably be /var/www/html/repos/rhel6/

Automatically Install SRPM Build Dependancies

An RPM spec file, among other things, enumerates a list of required packages under the BuildRequires tag. Every package listed must be installed on the build platform otherwise the build will fail. You can install the necessary BuildRequires packages either manually using yum or even rpm, but a easier way to do so is to use a utility called yum-builddep which is part of the familiar yum-utils package. $ sudo yum-builddep 389-ds-base-1.2.9.9-1.fc14.src.rpm If all goes well, all the dependency packages are automatically installed for you. Unfortunately yum-builddep does not know how to handle conditional BuildRequires and will sometimes incorrectly include

List packages in RPM Database using C

Here is one way of listing installed RPM packages. It works with all versions of CentOS 5, RHEL5 and up to Fedora 14. #include <stdio.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #include <unistd.h> #include <rpm/rpmlib.h> #include <rpm/header.h> #include <rpm/rpmdb.h> int main(int argc, char *argv[]) { rpmdbMatchIterator mi; int type, count; char *name; rpmdb db; Header h; rpmReadConfigFiles( NULL, NULL ); if (rpmdbOpen( "", &db, O_RDONLY, 0644 ) != 0) { fprintf( stderr, "ERROR: Cannot open RPM databasen"); exit(1); } mi = rpmdbInitIterator(db, RPMDBI_PACKAGES, NULL, 0); while ((h = rpmdbNextIterator(mi))) { headerGetEntry(h, RPMTAG_NAME, &type, (void **) &name, &count); printf("%sn", name);