CSE 374 15au - CSE Fedora 22 Linux VM Fixes

This note is for anyone who is using the CSE Fedora 22 Linux VM for CSE 374 assignments this quarter. Because of some last-minute changes at the beginning of the quarter, there are a few problems that you either need to repair or might want to fix. Here is a quick summary.

Must Do This

The VM is missing a C library that is required to compile and run programs. If this library is missing you will see messages similar to the following whenever you try to compile something with gcc:

In file included from /usr/include/features.h:389:0,
                 from /usr/include/assert.h:35,
                 from arrays.c:16:
/usr/include/gnu/stubs.h:10:27: fatal error: gnu/stubs-64.h: No such file or directory

To repair, open a terminal window and enter the following command:

sudo dnf -y install glibc-devel.x86_64
This only needs to be done once.

Should Do This

Fedora, like all operating systems, releases updates regularly to patch bugs, fix security problems, and upgrade existing programs. You should install updates regularly. To do this, enter the following command in a terminal window, preferably when nothing else is running:

sudo dnf upgrade

Unfortunately one of the packages in Fedora 22 has a bug in it that prevents normal updates from succeeding. If your VM has this problem, you will get a message that looks something like this when you run sudo dnf upgrade:

Error: Transaction check error:
  file /usr/lib/golang/pkg/tool/linux_amd64/vet from install of golang-bin-1.5.1-0.fc22.x86_64 
    conflicts with file from package golang-vet-0-2.0.hga7e14835e46b.fc22.x86_64

If that happens, there are two easy ways to get around it. If you want to leave this package installed (the Go programming language), you can run the update command and tell it to ignore this package while upgrading:

sudo dnf upgrade --exclude=golang\*

Or you can just remove the package with:

sudo dnf -y erase golang*
then run the regular sudo dnf upgrade command, which should work normally from now on.

Note: If this is the first time you have run upgrades on your VM you will want to do it some place where you have a fast network connection. There have been a lot of small, and several big, updates since the VM was packaged a month ago.

Might Want to Do These

Word List

The list of words that we used for the regular expression / sed / grep demos (/usr/share/dict/words) was missing in the original version of the VM. You can install it with the command:

sudo dnf install words

.bashrc / .bash_profile

These files contain commands that are run every time you log on and are the usual place to put commands that you want to execute each time you open a new terminal window (particularly .bashrc). Unfortunately, in the original version of the VM these were owned by user root instead of by your account, so you could not change them using your normal user permissions. The easy fix is to change the owner and group permissions to match ordinary files created by you, which should have been the case all along. Do this in your home directory:

sudo chown userid:userid .bash*

(Substitute your own user id in place of userid in the above command.)

display Command

The display command we used to show jpeg images on the screen wasn't installed either. You can get it with:

sudo dnf install imagemagick
or just answer yes after entering the display command when the system asks you if you want to install this package.