在 Ubuntu 21.04 中安装 NS-3 时出错

在 Ubuntu 21.04 中安装 NS-3 时出错

我正在尝试安装NS-3在我的 ubuntu-21.04-desktop-amd64.iso 中,但在尝试安装期间,当我运行以下命令时:

sudo apt-get install gir1.2-goocanvas-2.0 python-gi python-gi-cairo python3-gi python3-gi-cairo python3-pygraphviz gir1.2-gtk-3.0 ipython3

我收到此错误:

E: Package 'python-gi' has no installation candidate
E: Unable to locate package python-gi-cairo

答案1

python-gipython-cairopython3-gi-cairo软件包在默认的 Ubuntu 21.04 存储库中不可用。在 Ubuntu 21.04 中安装 Ubuntu 20.04 中的、 和。之后,安装python-gi、、、、和。python-cairopython3-gi-cairogir1.2-goocanvas-2.0python3-gipython3-gi-cairopython3-pygraphvizgir1.2-gtk-3.0ipython3

打开终端并输入:

wget -c http://mirrors.kernel.org/ubuntu/pool/universe/p/pygobject/python-gi_3.36.0-1_amd64.deb http://mirrors.kernel.org/ubuntu/pool/universe/p/pycairo/python-cairo_1.16.2-2ubuntu2_amd64.deb http://mirrors.kernel.org/ubuntu/pool/universe/p/pygobject/python-gi-cairo_3.36.0-1_amd64.deb
sudo apt update   
sudo apt install python2   
sudo apt install ./python-gi_3.36.0-1_amd64.deb 
sudo apt install ./python-cairo_1.16.2-2ubuntu2_amd64.deb
sudo apt install ./python-gi-cairo_3.36.0-1_amd64.deb
sudo apt install gir1.2-goocanvas-2.0 python3-gi python3-gi-cairo python3-pygraphviz gir1.2-gtk-3.0 ipython3

相关内容