As I had to work in a CentOS 5.7 VM recently, I wanted to take my entire development environment with me. Firstly, that meant setting up vim but it soon became clear that I needed to upgrade a few other packages too.
dircolors was complaining that it didn’t support some of the flags I use. After a bit of googling, I realised I needed to upgrade coreutils.
For context, here’s the version currently installed:
$ ls --version ls (GNU coreutils) 5.97
There’s a few prerequisites to install first:
$ sudo yum install gperf bison
Next, you’ll need a copy of coreutils. Annoyingly, CentOS 5.7 can’t extract the new tar.xz compression format so we’ll use the last available one with tar.gz format, coreutils-8.13.
$ wget http://ftp.gnu.org/gnu/coreutils/coreutils-8.13.tar.gz && tar xzvf coreutils-8.13.tar.gz && cd coreutils-8.13
Once we’ve downloaded & extracted the files and changed into that directory, it’s time to configure the packages.
If this completes successfully, make the binaries and install them.
$ make && sudo make install
Once this completes, log out and log back in again and check the version of
$ ls --version ls (GNU coreutils) 8.13
All done. We’ve now got a relatively new version of
Michael is a polyglot software engineer, committed to reducing complexity in systems and making them more predictable. Working with a variety of languages and tools, he shares his technical expertise to audiences all around the world at user groups and conferences. You can follow @mheap on Twitter