Issue installing af_packet plugin


I just finished installing the latest version on zeek (zeek version 3.1.1). Now I am trying install af_packet plugin to use with zeek but I am encountering the following issues:

When I run:

zkg install zeek/j-gras/bro-af_packet-plugin

I get the following error message:

The following packages will be INSTALLED:

zeek/j-gras/bro-af_packet-plugin (2.0.0)

Proceed? [Y/n] Y

Running unit tests for “zeek/j-gras/bro-af_packet-plugin”

Exception in thread Thread-1:

Traceback (most recent call last):

File “/usr/lib64/python2.7/”, line 812, in __bootstrap_inner

File “/bin/zkg”, line 355, in run

self.package_name, self.package_version)

File “/usr/lib/python2.7/site-packages/zeekpkg/”, line 2203, in install

return self._install(matches[0], version)

File “/usr/lib/python2.7/site-packages/zeekpkg/”, line 2265, in _install

status.current_hash = clone.head.object.hexsha

File “/usr/lib/python2.7/site-packages/git/refs/”, line 190, in _get_object

return Object.new_from_sha(self.repo, hex_to_bin(self.dereference_recursive(self.repo, self.path)))

File “/usr/lib/python2.7/site-packages/git/refs/”, line 132, in dereference_recursive

hexsha, ref_path = cls._get_ref_info(repo, ref_path)

File “/usr/lib/python2.7/site-packages/git/refs/”, line 181, in _get_ref_info

return cls._get_ref_info_helper(repo, ref_path)

File “/usr/lib/python2.7/site-packages/git/refs/”, line 145, in _get_ref_info_helper

with open(osp.join(repodir, ref_path), ‘rt’, encoding=‘UTF-8’) as fp:

TypeError: ‘encoding’ is an invalid keyword argument for this function

Traceback (most recent call last):

File “/bin/zkg”, line 2243, in


File “/bin/zkg”, line 2239, in main

args.run_cmd(manager, args, config, configfile)

File “/bin/zkg”, line 599, in cmd_install

print(‘Installed “{}” ({})’.format(name, ipkg.status.current_version))

AttributeError: ‘NoneType’ object has no attribute ‘status’

Can someone please help me with this?

Thanks in advance

To me this looks like an zkg related issue. It seems to require python 3 but is run with 2.7 in your setup.


Any idea how I can resolve the issue?

I used alternatives to switch to using "Python 3" but still getting the same error message.


I was able to resolve this by using python3.