在centos8中安装bugzillacli

28次阅读

共计 1242 个字符,预计需要花费 4 分钟才能阅读完成。

我们需要通过命令行登陆 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 bugzilla
WARNING: 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.0
Uninstalling 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.py
Proceed (y/n)? y
  Successfully uninstalled bugzilla-1.0.0

同理删除 pip2 的 bugzilla

然后就可以正常使用

$ bugzilla -h
usage: 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

正文完
 0