Skip to content

Instantly share code, notes, and snippets.

@jdhao
Last active December 26, 2020 02:39
Show Gist options
  • Save jdhao/a8746e3e7457565fffb8391ce6b78a0d to your computer and use it in GitHub Desktop.
Save jdhao/a8746e3e7457565fffb8391ce6b78a0d to your computer and use it in GitHub Desktop.
This script will install feh -- the simple image viewer, on your CentOS 7 system. Please make sure that you are using CentOS 7. See https://jdhao.github.io/2017/05/06/install-feh-image-viewer-on-centos/ for more details.
echo "Installing dependency packages..."
# install packages which can be found by yum
yum -y install libcurl-devel libX11-devel libXt-devel libXinerama-devel libpng-devel
# download and install packages which are not in yum repo
wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/Kenzy:/modified:/C7/CentOS_7/x86_64/imlib2-1.4.6-2.1.x86_64.rpm
wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/Kenzy:/modified:/C7/CentOS_7/x86_64/imlib2-devel-1.4.6-2.1.x86_64.rpm
wget https://jaist.dl.sourceforge.net/project/libjpeg-turbo/1.5.1/libjpeg-turbo-official-1.5.1.x86_64.rpm
yum --nogpgcheck localinstall imlib2-1.4.6-2.1.x86_64.rpm imlib2-devel-1.4.6-2.1.x86_64.rpm libjpeg-turbo-official-1.5.1.x86_64.rpm
# in case that the above download links are broken, you can go to https://goo.gl/2P0ZE1, https://goo.gl/USMDGt and http://www.libjpeg-turbo.org/
# to download the rpm packages respectively.
echo "Cloning feh from github..."
## clone the feh repo, compile and install
git clone git://github.com/derf/feh.git
cd feh
echo "make and install the package..."
make -j${nproc} && make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment