junk food for the brain …
Posts tagged yum.
Temporarily Disable a Yum Repository
Jul 24th
Sometimes, you may run into problems updating Fedora via yum. What you could do is temporarily disable the offending repository, and update everything else while the errors are being fixed upstream.
- List out your enabled yum repositories.
$ yum repolist
You would get something like this:
[raja@atreides ~]$ yum repolist Loaded plugins: fastestmirror, presto, refresh-packagekit repo id repo name status adobe-linux-i386 Adobe Systems Incorporated enabled: 17 chromium Chromium Test Packages enabled: 7 fedora Fedora 11 - i386 enabled: 13,289 rpmfusion-free RPM Fusion for Fedora 11 - Free enabled: 377 rpmfusion-free-updates RPM Fusion for Fedora 11 - Free - Upda enabled: 210 rpmfusion-nonfree RPM Fusion for Fedora 11 - Nonfree enabled: 110 rpmfusion-nonfree-updates RPM Fusion for Fedora 11 - Nonfree - U enabled: 115 updates Fedora 11 - i386 - Updates enabled: 3,451 repolist: 17,576
- The names on the left are the repo ids. To disable a particular one, for example
rpmfusion-nonfree-updateswhile doing updates, run your yum like this:-# yum upgrade --disablerepo=rpmfusion-free-updates
- This will help you upgrade the rest of the packages in the mean time.
2 CLI ways to determine which rpm package has a program you wish to install in Fedora Linux
Jul 8th
There are 2 ways I know of to search for a particular program to install in Linux. As usual, I’ll be focusing on the Command Line Interface (CLI).
So, you’ve heard about the versatile port scanning tool called nmap and want to install it in Fedora Linux. The only problem is, you don’t know if it has been pre-packaged and is available as an rpm binary. No worries, all you need to do is search for using yum.
Use the yum search command.
yum search nmap
Based on its output, you know there are packages available, and all you need to do is yum install nmap
[raja@atreides ~]$ yum search nmap Loaded plugins: fastestmirror, presto, refresh-packagekit ================================ Matched: nmap ================================= nmap.i586 : Network exploration tool and security scanner nmap-frontend.i586 : the GTK+ frontend for nmap onesixtyone.i586 : An efficient SNMP scanner perl-Nmap-Parser.noarch : Parse nmap scan data with perl psad.i586 : Port Scan Attack Detector (psad) watches for suspect traffic
Or, you might know that its called nmap, and want to search through you yum repositories to find if any of the available rpms have a file called nmap. To do that, use the yum provides */
yum provides */nmap
Look at what it gives:
[raja@atreides ~]$ yum provides */nmap Loaded plugins: fastestmirror, presto, refresh-packagekit 2:nmap-4.76-4.fc11.i586 : Network exploration tool and security scanner Repo : fedora Matched from: Filename : /usr/share/nmap Filename : /usr/bin/nmap
From this, you know that the nmap-4.76-4.fc11.i586 rpm contains these files, and by installing it, you get nmap.
How to use a download accelerator with a Rapidshare Premium Account in Fedora Linux
Jul 8th
After reading my previous post, the next question that’s bound to crop up is How do I use a download accelerator with my premium rapidshare share account in linux?
Being a command line junkie, I prefer using the terminal for my downloading needs. Let me introduce you to Aria2. As from the website.
aria2 is a multi-protocol & multi-source, cross platform download utility. The supported protocols are HTTP(S), FTP, BitTorrent (DHT, PEX, MSE/PE), and Metalink.
Using Fedora, my favourite distro of choice, you first have to install it via yum.
yum install aria2
Next, you’ll need to have your cookies saved. Refer to the previous post for more details.
Now comes the fun part, actually downloading the files.
Here’s a file which I uploaded, a movie trailer for a recent movie:-
http://rapidshare.com/files/207110649/terminatorsalvation-tlr1_h1080p.mov
To download with aria2, type in the following command:-
aria2c -s 5 -j 1 -c --load-cookies=/home/raja/cookies.txt http://rapidshare.com/files/207110649/terminatorsalvation-tlr1_h1080p.mov
The switches for this explained:-
- -s 5 Split the download into 5 connections
- -j 1 How many files to download at once.
- -c Continue any paused / cancelled downloads
- –load-cookies /path/to/cookie The rapidshare cookie file that was created earlier. This has to be an absolute path
- And finally the actual URL of the file
If you have a list of files to download, you can enter them in to a text file, and pass them to aria2 for batch downloading via the -i list_file_name option. e.g.
aria2c -s 5 -j 1 -c --load-cookies=/home/raja/cookies.txt -i lists.txt
Happy batch downloading!!!
How to install Virtual Box 3.0 in Fedora 11 32 bit
Jul 5th
When trying to install VirtualBox 3.0 in Fedora 11 32bit, you may encounter this error:-
[root@atreides ~]# rpm -ivh VirtualBox-2.2.4_47978_fedora11-1.i586.rpm Preparing... ########################################### [100%] 1:VirtualBox ########################################### [100%] Creating group 'vboxusers'. VM users must be member of that group! No precompiled module for this kernel found -- trying to build one. Messages emitted during module compilation will be logged to /var/log/vbox-install.log. Compilation of the kernel module FAILED! VirtualBox will not start until this problem is fixed. Please consult /var/log/vbox-install.log to find out why the kernel module does not compile. Most probably the kernel sources are not found. Install them and execute /etc/init.d/vboxdrv setup as root.
This happens even when you have the kernel-devel rpm package installed already.
The short:-
Your kernel is most probably a PAE kernel, so just yum install kernel-PAE-devel.i686 and then run /etc/init.d/vboxdrv setup. You can then run VirtualBox as usual.
The long:-
Further investigating, I tailed the /var/log/vbox-install.log file, which gave this error :-
[root@atreides ~]# tail /var/log/vbox-install.log ** Compiling vboxdrv Makefile:145: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop. </directory>
I found it kind of weird, since I have already installed the kernel-devel rpm. So I decided to check my kernel version with this command:-
[root@atreides ~]# uname -a Linux atreides.dune 2.6.29.5-191.fc11.i686.PAE #1 SMP Tue Jun 16 23:19:53 EDT 2009 i686 i686 i386 GNU/Linux
After reading up further, I saw this in the Fedora 11 Release Notes:-
3.1. x86 Specifics for Fedora
By default, the PAE kernel is used on 32-bit hardware, where supported by the hardware.
My CPU supports PAE, so by default the kernel-PAE rpm is installed. I checked this by using the following command:-
[root@atreides ~]# rpm -qa | grep kernel kernel-PAE-2.6.29.4-167.fc11.i686 kernel-firmware-2.6.29.5-191.fc11.noarch kernel-PAE-2.6.29.5-191.fc11.i686 kernel-devel-2.6.29.5-191.fc11.i586 kerneloops-0.12-5.fc11.i586 kernel-headers-2.6.29.5-191.fc11.i586
You can see that kernel-PAE-2.6.29.4-167.fc11.i686 and kernel-PAE-2.6.29.5-191.fc11.i686 is installed.
Doing a yum search kernel-PAE shows this:-
[raja@atreides ~]$ yum search kernel-PAE
Loaded plugins: fastestmirror, presto, refresh-packagekit
========================================= Matched: kernel-PAE =========================================
kmod-iscsitarget-PAE.i686 : Metapackage which tracks in iscsitarget kernel module for newest kernel-PAE
kernel-PAE.i686 : The Linux kernel compiled for PAE capable machines
kernel-PAE-devel.i686 : Development package for building kernel modules to match the PAE kernel
kernel-PAEdebug.i686 : The Linux kernel compiled with extra debugging enabled for PAE capable machines
kernel-PAEdebug-devel.i686 : Development package for building kernel modules to match the PAEdebug
: kernel
kmod-VirtualBox-OSE-PAE.i686 : Metapackage which tracks in VirtualBox-OSE kernel module for newest
: kernel-PAE
kmod-blcr-PAE.i686 : Metapackage which tracks in blcr kernel module for newest kernel-PAE
kmod-em8300-PAE.i686 : Metapackage which tracks in em8300 kernel module for newest kernel-PAE
kmod-kqemu-PAE.i686 : Metapackage which tracks in kqemu kernel module for newest kernel-PAE
kmod-ndiswrapper-PAE.i686 : Metapackage which tracks in ndiswrapper kernel module for newest kernel-PAE
kmod-nvidia-173xx-PAE.i686 : Metapackage which tracks in nvidia-173xx kernel module for newest
: kernel-PAE
kmod-nvidia-PAE.i686 : Metapackage which tracks in nvidia kernel module for newest kernel-PAE
kmod-open-vm-tools-PAE.i686 : Metapackage which tracks in open-vm-tools kernel module for newest
: kernel-PAE
kmod-rt2860-PAE.i686 : Metapackage which tracks in rt2860 kernel module for newest kernel-PAE
kmod-rt2870-PAE.i686 : Metapackage which tracks in rt2870 kernel module for newest kernel-PAE
kmod-rt3070-PAE.i686 : Metapackage which tracks in rt3070 kernel module for newest kernel-PAE
kmod-slmodem-PAE.i686 : Metapackage which tracks in slmodem kernel module for newest kernel-PAE
kmod-sysprof-PAE.i686 : Metapackage which tracks in sysprof kernel module for newest kernel-PAE
kmod-wl-PAE.i686 : Metapackage which tracks in wl kernel module for newest kernel-PAE
Now you know that the kernel-sources for the PAE kernel is kernel-PAE-devel.i686. So, I’d hav to install that instead.
[root@atreides ~]# yum install kernel-PAE-devel.i686 Loaded plugins: fastestmirror, presto, refresh-packagekit Loading mirror speeds from cached hostfile * fedora: mirror.oscc.org.my * rpmfusion-free: mirror.transact.net.au * rpmfusion-free-updates: mirror.transact.net.au * rpmfusion-nonfree: mirror.transact.net.au * rpmfusion-nonfree-updates: mirror.transact.net.au * updates: mirror.oscc.org.my Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package kernel-PAE-devel.i686 0:2.6.29.5-191.fc11 set to be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================= Package Arch Version Repository Size ======================================================================================================= Installing: kernel-PAE-devel i686 2.6.29.5-191.fc11 updates 6.2 M Transaction Summary ======================================================================================================= Install 1 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 6.2 M Is this ok [y/N]: y Downloading Packages: Setting up and reading Presto delta metadata Processing delta metadata Package(s) data still to download: 6.2 M kernel-PAE-devel-2.6.29.5-191.fc11.i686.rpm | 6.2 MB 08:33 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : kernel-PAE-devel-2.6.29.5-191.fc11.i686 1/1 Installed: kernel-PAE-devel.i686 0:2.6.29.5-191.fc11 Complete!
Once done, run /etc/init.d/vboxdrv setup as root, and your done.
root@atreides ~]# /etc/init.d/vboxdrv setup Stopping VirtualBox kernel module [ OK ] Recompiling VirtualBox kernel module [ OK ] Starting VirtualBox kernel module [ OK ]
You can now run VirtualBox.
6 Ubuntu Package Management tips for the Fedora User
Mar 9th
After deciding that compiling Boxee for Fedora was quite a futile attempt, I installed Ubuntu 8.10 (Intrepid Ibex) on my desktop PC, just to run it.
One of the first things I needed to do was install the latest updates for it. Thats when I realised that I didn’t know nuts about software installation in Ubuntu, other than it was apt-get something.
After reading up the ubuntu docs, and a little googling around, I’ve compiled a list of common tasks I do with yum on Fedora and its Ubuntu equivalents.
- yum upgrade is apt-get upgrade
This one is a little tricky. You should first run apt-get update to get the updated list of files in from the repository. Then follow up by the apt-get upgrade.
- yum search packagename is apt-cache search packagename
The indispensable yum search is apt-cache search. Good to look through the repositories to determine which package you need to install. Just like yum, you could search for terms or keywords, apt-cache will give you the packages that have matching descriptions.
- yum info packagename is apt-cache show packagename
Like yum info, this provides descriptions on the packages you want to install. An interesting addition comapred to Fedora is the Suggests: column, which gives you additional packages that you might want to install to enhance functionality of the program.
Here’s a sample:-
raja@atom:~/Examples$ apt-cache show mplayer Package: mplayer Priority: extra Section: multiverse/graphics Installed-Size: 10088 Maintainer: Ubuntu MOTU Developers <ubuntu -motu@lists.ubuntu.com> Original-Maintainer: Ubuntu MOTU Media Team <motumedia @tauware.de> Architecture: i386 Version: 2:1.0~rc2-0ubuntu17 Replaces: mplayer-nogui Depends: libaa1 (>= 1.4p5), libartsc0 (>= 1.5.9), libasound2 (>> 1.0.17), libatk1.0-0 (>= 1.20.0), libaudio2, libaudiofile0 (>= 0.2.3-4), libc6 (>= 2.7), libcaca0 (>= 0.99.beta13b-1), libcairo2 (>= 1.2.4), libcdparanoia0, libcucul0 (>= 0.99.beta13b-1), libdbus-1-3 (>= 1.0.2), libdbus-glib-1-2 (>= 0.71), libdv4, libenca0 (>= 1.9), libesd-alsa0 (>= 0.2.35) | libesd0 (>= 0.2.35), libfaac0 (>= 1.26), libfontconfig1 (>= 2.4.0), libfreetype6 (>= 2.3.5), libfribidi0 (>= 0.10.9), libgcc1 (>= 1:4.1.1), libggi2 (>= 1:2.2.2), libgif4 (>= 4.1.6), libgl1-mesa-glx | libgl1, libglib2.0-0 (>= 2.12.0), libgtk2.0-0 (>= 2.14.1), libjack0 (>= 0.109.2), libjpeg62, liblircclient0, liblzo2-2, libmad0 (>= 0.15.1b-3), libmp3lame0 (>= 3.98), libmpcdec3, libncurses5 (>= 5.6+20071006-3), libogg0 (>= 1.0rc3), libopenal1 (>= 1:1.3.253), libpango1.0-0 (>= 1.21.6), libpng12-0 (>= 1.2.13-4), libpulse0 (>= 0.9.8), libsdl1.2debian (>= 1.2.10-1), libsmbclient (>= 3.0.24), libspeex1 (>= 1.2~beta3-1), libstdc++6 (>= 4.1.1), libsvga1, libtheora0 (>= 0.0.0.alpha7.dfsg-1.1), libvorbis0a (>= 1.1.2), libx11-6, libx264-59 (>= 1:0.svn20080408), libxext6, libxinerama1, libxt6, libxv1, libxvidcore4 (>= 1:1.0.0-0.0), libxvmc1, libxxf86dga1, libxxf86vm1, zlib1g (>= 1:1.1.4), ttf-bitstream-vera, mplayer-skins, ttf-dejavu Suggests: w32codecs, libdvdcss, mplayer-doc, ladspa-sdk Conflicts: mplayer-nogui Filename: pool/multiverse/m/mplayer/mplayer_1.0~rc2-0ubuntu17_i386.deb Size: 4425834 MD5sum: c34e4650c294bf0277d37432bdd81bde SHA1: da382398f120a0ecb421ac160d4d5676c081b27a SHA256: edf9c491e09c9f215a57db60df2ba94d17561ea20d890d576f5202a760dd5ad0 Description: The Ultimate Movie Player For Linux It plays most mpeg, avi and asf files, supported by many native and win32 DLL codecs. You can watch VCD, DVD and even DivX movies too. The other big feature of mplayer is the wide range of supported output drivers. It works with X11, Xv, DGA, OpenGL, SVGAlib, fbdev, but you can use SDL (and this way all drivers of SDL) and some lowlevel card-specific drivers (for Matrox/3dfx/SiS) too! Most of them supports software or hardware scaling, so you can enjoy movies in fullscreen. . This version includes the Gtk GUI Bugs: mailto:ubuntu-users@lists.ubuntu.com Origin: Ubuntu </motumedia></ubuntu>
- yum deplist is apt-cache showpkg
Provides similiar information, giving you an idea of the additional dependencies required to run the program.
- yum grouplist is tasksel –list-tasks
Yum in Fedora has groups. So does Ubuntu. Finding it involved a little google-fu, but they work relatively the same. I sort of like the way tasksel lists its already installed / available packages. Seems more neat to me, eventhough new users may encounter a WTF??? moment looking at the the u & i prepended on the task names.
- yum groupinfo a combo of 2 separate tasksel commands
yum groupinfo gives you a description of the task or group, as well as a list of packages that need to be installed To get similiar info from tasksel, run tasksel –task-desc lamp-server to get a brief description on the task. e.g.
raja@atom:~/Examples$ tasksel --task-desc lamp-server Selects a ready-made Linux/Apache/MySQL/PHP server.
To get a list of packages that task installs, run tasksel –task-packages taskname.
raja@atom:~/Examples$ tasksel --task-packages lamp-server libwrap0 apache2 mysql-client-5.0 tcpd libapache2-mod-php5 apache2.2-common apache2-utils php5-common libaprutil1 php5-mysql libmysqlclient15off libdbi-perl libplrpc-perl mysql-server openssl-blacklist libdbd-mysql-perl mysql-server-5.0 libnet-daemon-perl libapr1 libpq5 ssl-cert apache2-mpm-prefork mysql-common
I guess that would be it for this post. I’ll post more if I find anything else that I may be missing.
Sources for my info:-