Why 'firewall-config' command fails with error "ImportError: cannot import name NetworkManager" ?

Solution Verified - Updated -

Issue

  • When running firewall-config command, its failing with error message as shown below:
[root@hostname /]# firewall-config
ERROR:root:Could not find any typelib for NetworkManager
Traceback (most recent call last):
  File "/usr/bin/firewall-config", line 34, in <module>
    from gi.repository import NetworkManager
ImportError: cannot import name NetworkManager
[root@hostname /]#

Environment

  • Red Hat Enterprise Linux 7.1
  • Firewalld
  • NetworkManager

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content