我们需要通过命令行登陆bugzilla就需要安装bugzilla命令行工具
bugzilla相关的安装包
sudo yum install libreport-rhel-bugzilla.x86_64
sudo yum install libreport-plugin-bugzilla
sudo yum install python3-bugzilla
sudo yum install python-bugzilla-cli
注意不要通过pip3安装bugzilla
会导致如下报错
ModuleNotFoundError: No module named 'bugzilla._cli'; 'bugzilla' is not a package
$ pip3 uninstall bugzillaWARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.Found existing installation: bugzilla 1.0.0Uninstalling bugzilla-1.0.0: Would remove: /usr/local/lib/python3.6/site-packages/bugzilla-1.0.0-py3.6.egg-info /usr/local/lib/python3.6/site-packages/bugzilla.pyProceed (y/n)? y Successfully uninstalled bugzilla-1.0.0
同理删除pip2的bugzilla
然后就可以正常使用
$ bugzilla -husage: bugzilla [-h] [--bugzilla BUGZILLA] [--nosslverify] [--cert CERT] [--login] [--username USERNAME] [--password PASSWORD] [--restrict-login] [--ensure-logged-in] [--no-cache-credentials] [--cookiefile COOKIEFILE] [--tokenfile TOKENFILE] [--verbose] [--debug] [--version] {new,query,info,modify,attach,login} ...positional arguments: {new,query,info,modify,attach,login}optional arguments: -h, --help show this help message and exit