When working with CentOS 6.2 minimal installations, you might encounter the frustrating message when trying to install the handy pv
(Pipe Viewer) utility:
yum install pv
Loaded plugins: fastestmirror, security
Setting up Install Process
No package pv available.
Error: Nothing to do
CentOS 6.2 minimal comes with only the base repositories enabled by default. The pv
package isn't included in these default repos, which explains why yum can't find it.
The Extra Packages for Enterprise Linux (EPEL) repository contains many useful additional packages including pv
. Here's how to enable it:
# For CentOS 6 32-bit:
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# For CentOS 6 64-bit:
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
After adding EPEL, clear your yum cache and try installing again:
yum clean all
yum install pv
If you prefer not to enable EPEL, you can compile from source:
wget http://www.ivarch.com/programs/sources/pv-1.6.6.tar.bz2
tar xjf pv-1.6.6.tar.bz2
cd pv-1.6.6
./configure
make
make install
Once installed, you can use pv
to monitor pipeline progress:
# Basic file copy monitoring
pv largefile.iso > /dev/sdb
# Network transfer monitoring
dd if=/dev/zero bs=1M count=1000 | pv | ssh user@remote "cat > /dev/null"
- If EPEL installation fails, check your network connectivity
- Verify the repository is properly enabled in
/etc/yum.repos.d/epel.repo
- Consider checking for newer EPEL release versions if the above links don't work
When working with CentOS 6.2 minimal installations, you might encounter this frustrating situation:
yum install pv
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirror.thelinuxfix.com
* extras: mirror.atlanticmetro.net
* updates: ftp.usf.edu
No package pv available.
Error: Nothing to do
The minimal CentOS 6.2 installation comes with limited default repositories that don't include many useful utilities like Pipe Viewer (pv), which is commonly used for monitoring data progress through pipelines.
The easiest solution is to enable the EPEL (Extra Packages for Enterprise Linux) repository:
# For 32-bit systems:
wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6-8.noarch.rpm
# For 64-bit systems:
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6-8.noarch.rpm
After adding EPEL, verify it's properly configured:
yum repolist
You should see epel in the list of available repositories.
Now you can install pv normally:
yum install pv
If you prefer not to add EPEL, you can compile from source:
wget http://www.ivarch.com/programs/sources/pv-1.6.6.tar.bz2
tar -xjvf pv-1.6.6.tar.bz2
cd pv-1.6.6
./configure
make
make install
Once installed, try these common use cases:
# Monitor file copy progress
pv largefile.iso > /dev/sdb
# Monitor MySQL dump progress
mysqldump -u root -p database | pv | gzip > backup.sql.gz
# Show progress while compressing
tar -cf - directory/ | pv -s $(du -sb directory/ | awk '{print $1}') | gzip > archive.tar.gz
If you still can't install pv after adding EPEL:
yum clean all
yum makecache
yum install pv
For enterprise environments, you might want to permanently configure EPEL. Create /etc/yum.repos.d/epel.repo with:
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6