Issue with Installation PyGObject for Ubuntu

Hello,

I could not go through the installation process in Ubuntu machine, and I need some helps.

I stuck at this command line:

sudo apt install libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0

Here is output:

(Test) lnguyen@pop-luke:~/PycharmProjects/Test$ sudo apt install libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0
[sudo] password for lnguyen: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
gcc is already the newest version (4:11.2.0-1ubuntu1).
libcairo2-dev is already the newest version (1.16.0-5ubuntu1).
libcairo2-dev set to manually installed.
pkg-config is already the newest version (0.29.2-1ubuntu1).
python3-dev is already the newest version (3.9.4-1build1).
gir1.2-gtk-3.0 is already the newest version (3.24.30-1ubuntu1.1).
The following additional packages will be installed:
  gobject-introspection python3-mako python3-markdown python3-markupsafe
Suggested packages:
  libgirepository1.0-doc python3-beaker python-mako-doc python-markdown-doc
The following NEW packages will be installed:
  gobject-introspection libgirepository1.0-dev python3-mako python3-markdown python3-markupsafe
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,257 kB of archives.
After this operation, 13.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err:1 http://us.archive.ubuntu.com/ubuntu impish/main amd64 python3-markupsafe amd64 1.1.1-1build2
  404  Not Found [IP: 91.189.91.39 80]
Get:2 http://us.archive.ubuntu.com/ubuntu impish/main amd64 python3-mako all 1.1.3+ds1-2 [59.4 kB]
Ign:3 http://us.archive.ubuntu.com/ubuntu impish/main amd64 python3-markdown all 3.3.4-1
Err:4 http://us.archive.ubuntu.com/ubuntu impish/main amd64 gobject-introspection amd64 1.68.0-1build2
  404  Not Found [IP: 91.189.91.39 80]
Err:5 http://us.archive.ubuntu.com/ubuntu impish/main amd64 libgirepository1.0-dev amd64 1.68.0-1build2
  404  Not Found [IP: 91.189.91.39 80]
Err:3 http://us.archive.ubuntu.com/ubuntu impish/main amd64 python3-markdown all 3.3.4-1
  404  Not Found [IP: 91.189.91.39 80]
Fetched 59.4 kB in 1s (100 kB/s)
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/m/markupsafe/python3-markupsafe_1.1.1-1build2_amd64.deb  404  Not Found [IP: 91.189.91.39 80]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/p/python-markdown/python3-markdown_3.3.4-1_all.deb  404  Not Found [IP: 91.189.91.39 80]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/g/gobject-introspection/gobject-introspection_1.68.0-1build2_amd64.deb  404  Not Found [IP: 91.189.91.39 80]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/g/gobject-introspection/libgirepository1.0-dev_1.68.0-1build2_amd64.deb  404  Not Found [IP: 91.189.91.39 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

This Error code from Pycharm - my programing platform

Error text: Collecting pygobject
  Using cached PyGObject-3.42.2.tar.gz (719 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting pycairo>=1.16.0
  Using cached pycairo-1.23.0-cp310-cp310-linux_x86_64.whl
Building wheels for collected packages: pygobject
  Building wheel for pygobject (pyproject.toml): started
  Building wheel for pygobject (pyproject.toml): finished with status 'error'
Failed to build pygobject


  error: subprocess-exited-with-error
  
  × Building wheel for pygobject (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [46 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-310
      creating build/lib.linux-x86_64-cpython-310/pygtkcompat
      copying pygtkcompat/generictreemodel.py -> build/lib.linux-x86_64-cpython-310/pygtkcompat
      copying pygtkcompat/pygtkcompat.py -> build/lib.linux-x86_64-cpython-310/pygtkcompat
      copying pygtkcompat/__init__.py -> build/lib.linux-x86_64-cpython-310/pygtkcompat
      creating build/lib.linux-x86_64-cpython-310/gi
      copying gi/docstring.py -> build/lib.linux-x86_64-cpython-310/gi
      copying gi/_error.py -> build/lib.linux-x86_64-cpython-310/gi
      copying gi/_constants.py -> build/lib.linux-x86_64-cpython-310/gi
      copying gi/_gtktemplate.py -> build/lib.linux-x86_64-cpython-310/gi
      copying gi/_option.py -> build/lib.linux-x86_64-cpython-310/gi
      copying gi/importer.py -> build/lib.linux-x86_64-cpython-310/gi
      copying gi/pygtkcompat.py -> build/lib.linux-x86_64-cpython-310/gi
      copying gi/module.py -> build/lib.linux-x86_64-cpython-310/gi
      copying gi/_ossighelper.py -> build/lib.linux-x86_64-cpython-310/gi
      copying gi/_signalhelper.py -> build/lib.linux-x86_64-cpython-310/gi
      copying gi/__init__.py -> build/lib.linux-x86_64-cpython-310/gi
      copying gi/_propertyhelper.py -> build/lib.linux-x86_64-cpython-310/gi
      copying gi/types.py -> build/lib.linux-x86_64-cpython-310/gi
      creating build/lib.linux-x86_64-cpython-310/gi/repository
      copying gi/repository/__init__.py -> build/lib.linux-x86_64-cpython-310/gi/repository
      creating build/lib.linux-x86_64-cpython-310/gi/overrides
      copying gi/overrides/Gtk.py -> build/lib.linux-x86_64-cpython-310/gi/overrides
      copying gi/overrides/Gdk.py -> build/lib.linux-x86_64-cpython-310/gi/overrides
      copying gi/overrides/GLib.py -> build/lib.linux-x86_64-cpython-310/gi/overrides
      copying gi/overrides/keysyms.py -> build/lib.linux-x86_64-cpython-310/gi/overrides
      copying gi/overrides/GObject.py -> build/lib.linux-x86_64-cpython-310/gi/overrides
      copying gi/overrides/GIMarshallingTests.py -> build/lib.linux-x86_64-cpython-310/gi/overrides
      copying gi/overrides/Pango.py -> build/lib.linux-x86_64-cpython-310/gi/overrides
      copying gi/overrides/GdkPixbuf.py -> build/lib.linux-x86_64-cpython-310/gi/overrides
      copying gi/overrides/Gio.py -> build/lib.linux-x86_64-cpython-310/gi/overrides
      copying gi/overrides/__init__.py -> build/lib.linux-x86_64-cpython-310/gi/overrides
      warning: build_py: byte-compiling is disabled, skipping.
      
      running build_ext
      Package gobject-introspection-1.0 was not found in the pkg-config search path.
      Perhaps you should add the directory containing `gobject-introspection-1.0.pc'
      to the PKG_CONFIG_PATH environment variable
      No package 'gobject-introspection-1.0' found
      Command '('pkg-config', '--print-errors', '--exists', 'gobject-introspection-1.0 >= 1.56.0')' returned non-zero exit status 1.
      
      Try installing it with: 'sudo apt install libgirepository1.0-dev'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pygobject
ERROR: Could not build wheels for pygobject, which is required to install pyproject.toml-based projects

I am really not sure If I am missing anything or something seem very strange here about the external package where the package python3-markupsafe_1.1.1-1build2_amd64.deb is Not Found …

Please help

Try running sudo apt update.

@mazharhussain Thanks for your suggestion. I do believe that my description is not detail enough, and probably it’s missing a lot of important information.

Here is my sudo apt update.

lnguyen@pop-luke:~$ sudo apt-get update
[sudo] password for lnguyen: 
Hit:1 http://apt.pop-os.org/proprietary impish InRelease
Hit:2 http://apt.pop-os.org/release impish InRelease                           
Ign:3 http://us.archive.ubuntu.com/ubuntu impish InRelease                     
Ign:4 http://us.archive.ubuntu.com/ubuntu impish-security InRelease            
Ign:5 http://us.archive.ubuntu.com/ubuntu impish-updates InRelease             
Hit:6 http://ppa.launchpad.net/daniruiz/flat-remix/ubuntu impish InRelease     
Ign:7 http://us.archive.ubuntu.com/ubuntu impish-backports InRelease           
Err:8 http://us.archive.ubuntu.com/ubuntu impish Release                  
  404  Not Found [IP: 91.189.91.38 80]
Err:9 http://us.archive.ubuntu.com/ubuntu impish-security Release         
  404  Not Found [IP: 91.189.91.38 80]
Err:10 http://us.archive.ubuntu.com/ubuntu impish-updates Release         
  404  Not Found [IP: 91.189.91.38 80]
Err:11 http://us.archive.ubuntu.com/ubuntu impish-backports Release      
  404  Not Found [IP: 91.189.91.38 80]
Hit:12 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/impish pgadmin4 InRelease
Reading package lists... Done
E: The repository 'http://us.archive.ubuntu.com/ubuntu impish Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://us.archive.ubuntu.com/ubuntu impish-security Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://us.archive.ubuntu.com/ubuntu impish-updates Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://us.archive.ubuntu.com/ubuntu impish-backports Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

It seems you’re having issues the Ubuntu package servers.

I recommend you ask on the Ubuntu discussion forum, also for help on how to install pygobject on Ubuntu if the installation instructions do not work.

1 Like

Using the main repository (archive.ubuntu.com instead of us.archive.ubuntu.com) is also a solution. Or you just wait for the US mirror to be up to date.

1 Like

Ubuntu 21.10 reached end of life in July this year. At some point they close down the repositories, which might explain the 404 Not Found. Try to do an upgrade. Version 22.04 is an LTS, supported for 5 years.

1 Like

I checked and Impish is indeed not listed on the main server… (never imagined they were removing the packages).

@Mikenux Yeah, that is what I thought, I need this package for a project, but since they did this, I dont know what to do . I dont want to us the archive.ubuntu.com because it will impact the production version, since the production version of the project is running with us.archive.ubuntu.com

Successfully OS Upgraded :sunglasses:

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.