AFS kernel module cannot be built


I tried to install the OpenAFS client. The package installation failed, complaining that the AFS kernel module could not be built for my Linux kernel:

$ sudo apt install openafs-client
AFS module /lib/modules/3.19.0-28-generic/fs/openafs.ko does not exist.
Not starting AFS.  Please consider building kernel modules using
instructions in /usr/share/doc/openafs-client/README.modules
Setting up openafs-modules-dkms (1.6.7-1ubuntu1) ...
Loading new openafs-1.6.7 DKMS files...
First Installation: checking all kernels...
Building only for 3.19.0-28-generic
Building initial module for 3.19.0-28-generic
Traceback (most recent call last):
  File "/usr/share/apport/package-hooks/", line 97, in <module>
    with open(apport.fileutils.make_report_path(report), 'wb') as f:
AttributeError: 'module' object has no attribute 'make_report_path'
Error! Bad return status for module build on kernel: 3.19.0-28-generic (x86_64)
Consult /var/lib/dkms/openafs/1.6.7/build/make.log for more information.
Processing triggers for ureadahead (0.100.0-16) ...

Restarting the OpenAFS service, complained about the missing kernel module:

$ sudo /etc/init.d/openafs-client restart
Stopping AFS services:.
Starting AFS services:
AFS module /lib/modules/3.19.0-28-generic/fs/openafs.ko does not exist.
Not starting AFS.  Please consider building kernel modules using
instructions in /usr/share/doc/openafs-client/README.modules

Running any OpenAFS program, like klog for example, gave a strange error:

$ klog
Unable to authenticate to AFS because a pioctl failed.


The AFS kernel module did not compile because of changes in recent kernel source code. The bug is reported here. It can be fixed if you can install patches and recompile the kernel or pull a modified kernel from Ubuntu servers.

An easier solution is to get the updated OpenAFS package from their PPA here:

$ sudo apt-get purge openafs-client
$ sudo add-apt-repository ppa:openafs/stable
$ sudo apt-get update
$ sudo apt install openafs-client

The AFS kernel module was compiled successfully when I tried this and everything worked fine!

Tried with: Ubuntu 14.04 and Linux kernel 3.19.0-28

3 thoughts on “AFS kernel module cannot be built

  1. Thanks! Worked also for Xenial with 4.8.0-36 kernel.

    Installed AFS client but the kernel module build failed and aklog gave an error: a pioctl failed while obtaining tokens for cell


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.