Score:0

Cannot intall any software on Ubuntu 22.04

tt flag

I'm new to ubuntu and installed Ubuntu 22.04.2 LTS 64-bit and Gnome version 42.5. I installed linux alongside windows. The ubuntu version is required by my instructor in college.

But when I tried to install something using GUI or terminal the problem started to come in. For example, I can't open 'Ubuntu Software' now, I used to open it yesterday but it's not displayed normally either and when I clicked on anything, the software centre simply crashed.

Things I've done on my ubuntu: install a theme follow https://itsfoss.com/best-gtk-themes/. install a deepin-wine on https://github.com/zq1997/deepin-winehttps://github.com/zq1997/deepin-wine to install a wechat.

By the way, because I'm in mainland China, I have to set up a proxy, I set the network proxy with 'Manual' -> HTTP Proxy: 127.0.0.1; 7890 /// HTTPs Proxy: 127.0.0.1; 7890. I don't if this is the right way because I have no prior experience. But I can access all foreign websites like youtube now which are not accessible without proxy. The server from Tsinghua I added in the following trials is also recommended by my instructor but it does not work normally.

I cannot install things in terminal either. For example, if I type

sudo apt install wine

the terminal tells me

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 wine : Depends: wine64 (>= 6.0.3~repack-1) but it is not going to be installed or
                 wine32 (>= 6.0.3~repack-1)
        Depends: wine64 (< 6.0.3~repack-1.1~) but it is not going to be installed or
                 wine32 (< 6.0.3~repack-1.1~)
E: Unable to correct problems, you have held broken packages.

In software&Update, I enable the first four options and download from the server from Malaysia that performs best in the test provided by ubuntu. And in the second section Sorry I don't have a decent screenshot software because I can't install any either

I may have done something inproper that remove some of the servers by accident.

If I type in

$ cat /etc/apt/sources.list
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb http://my.mirrors.thegigabit.com/ubuntu/ jammy main universe restricted multiverse

I have also installed the following packages successfully according to instructor's requirements (with sudo):

apt-get install build-essential    # build-essential packages, include binary utilities, gcc, make, and so on
apt-get install man                # on-line reference manual
apt-get install gcc-doc            # on-line reference manual for gcc
apt-get install gdb                # GNU debugger
apt-get install git                # revision control system
apt-get install libreadline-dev    # a library used later
apt-get install libsdl2-dev        # a library used later
apt-get install llvm llvm-dev      # llvm project, which contains libraries used later
apt-get install llvm-11 llvm-11-dev # only for ubuntu20.04

Solutions provided by other posts that I've tried:

~$ sudo apt-get --purge --reinstall install software-center
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package software-center is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'software-center' has no installation candidate
$ sudo apt clean
$ sudo apt update && sudo apt upgrade
Hit:1 http://my.mirrors.thegigabit.com/ubuntu jammy InRelease
Hit:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy InRelease               
Hit:3 https://dl.google.com/linux/chrome/deb stable InRelease         
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
  libavcodec-extra libavdevice58 ffmpeg libpostproc55 libavcodec-extra58
  libavutil56 libswscale5 libswresample3 libavformat58 libavfilter7
Learn more about Ubuntu Pro at https://ubuntu.com/pro
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo apt autoremove gnome-software && sudo apt install gnome-software
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  gnome-software gnome-software-common gnome-software-plugin-snap
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
After this operation, 3,251 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 241694 files and directories currently installed.)
Removing gnome-software-plugin-snap (41.5-2) ...
Removing gnome-software (41.5-2) ...
Removing gnome-software-common (41.5-2) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for libglib2.0-0:amd64 (2.72.1-1) ...
Processing triggers for libglib2.0-0:i386 (2.72.1-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  gnome-software-common gnome-software-plugin-snap
Suggested packages:
  gnome-software-plugin-flatpak
The following NEW packages will be installed:
  gnome-software gnome-software-common gnome-software-plugin-snap
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 655 kB of archives.
After this operation, 3,251 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy/universe amd64 gnome-software-common all 41.5-2 [20.3 kB]
Get:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy/universe amd64 gnome-software amd64 41.5-2 [606 kB]
Get:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy/universe amd64 gnome-software-plugin-snap amd64 41.5-2 [28.8 kB]
Fetched 655 kB in 2s (305 kB/s)                  
Selecting previously unselected package gnome-software-common.
(Reading database ... 241633 files and directories currently installed.)
Preparing to unpack .../gnome-software-common_41.5-2_all.deb ...
Unpacking gnome-software-common (41.5-2) ...
Selecting previously unselected package gnome-software.
Preparing to unpack .../gnome-software_41.5-2_amd64.deb ...
Unpacking gnome-software (41.5-2) ...
Selecting previously unselected package gnome-software-plugin-snap.
Preparing to unpack .../gnome-software-plugin-snap_41.5-2_amd64.deb ...
Unpacking gnome-software-plugin-snap (41.5-2) ...
Setting up gnome-software-common (41.5-2) ...
Setting up gnome-software (41.5-2) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for libglib2.0-0:i386 (2.72.1-1) ...
Processing triggers for libglib2.0-0:amd64 (2.72.1-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Setting up gnome-software-plugin-snap (41.5-2) ...
$ sudo snap remove snap-store
snap-store removed
$ sudo snap install snap-store
error: cannot install "snap-store": Post
       https://api.snapcraft.io/v2/snaps/refresh: parse 127.0.0.1:7890: first
       path segment in URL cannot contain colon

After doing this I found that the 'software' (instead of Ubuntu software) I uninstalled earlier appears again. But it cannot act normally either.

Screenshot of my software centre

The index page looks fine, but when I clicked on any of items in catalogue then comes an error. After that if I click on any of the software, it simply crash.

$ gnome-software
04:13:02:0302 GLib-GIO g_dbus_proxy_new: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
04:13:04:0191 Gs  not handling error failed for action get-popular: status-code=500 kind=(null) message=Get https://api.snapcraft.io/v2/snaps/find?architecture=amd64&category=featured&confinement=strict%2Cclassic&fields=base%2Cconfinement%2Clinks%2Ccontact%2Cdescription%2Cdownload%2Clicense%2Cprices%2Cprivate%2Cpublisher%2Crevision%2Csummary%2Ctitle%2Ctype%2Cversion%2Cwebsite%2Cstore-url%2Cmedia%2Ccommon-ids%2Cchannel: parse 127.0.0.1:7890: first path segment in URL cannot contain colon
04:13:04:0191 Gs  adding wildcard app */*/*/org.gnome.Builder.desktop/* to plugin cache
04:13:04:0191 Gs  adding wildcard app */*/*/org.gnome.Calculator.desktop/* to plugin cache
04:13:04:0191 Gs  adding wildcard app */*/*/org.gnome.clocks.desktop/* to plugin cache
04:13:04:0191 Gs  adding wildcard app */*/*/org.gnome.Dictionary.desktop/* to plugin cache
04:13:04:0191 Gs  adding wildcard app */*/*/org.gnome.Documents.desktop/* to plugin cache
04:13:04:0191 Gs  adding wildcard app */*/*/org.gnome.Evince/* to plugin cache
04:13:04:0191 Gs  adding wildcard app */*/*/org.gnome.gedit.desktop/* to plugin cache
04:13:04:0191 Gs  adding wildcard app */*/*/org.gnome.Maps.desktop/* to plugin cache
04:13:04:0191 Gs  adding wildcard app */*/*/org.gnome.Weather/* to plugin cache
04:13:04:0192 Gs  Only 0 apps for recent list, hiding
04:13:04:0980 Gs  Only 7 apps for popular list, hiding
04:13:05:0148 GsPluginSnap Failed to find refreshable snaps: status-code=500 kind=(null) message=cannot list updates: Post https://api.snapcraft.io/v2/snaps/refresh: parse 127.0.0.1:7890: first path segment in URL cannot contain colon
04:13:05:0193 Gtk Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.

I also try other method included in these two posts: https://www.maketecheasier.com/ubuntu-software-center-not-working-fixes/ https://itslinuxfoss.com/ubuntu-software-center-not-loading/ and I'm sure none of them work for me. It should be the problem with my proxy or network settings. Actually when I first installed ubuntu I cannot access to the 'software' the ubuntu borned with, after I finished intallation it told me I can access to many useful software in the software center and I cannot open it at that time.

Please help me out, this is very important to me! Thank you very much. Please let me know if any other information should be provided.

Joshrem avatar
tt flag
@David no, I don't manually change the gnome version and I haven't set up any programming environment either. But now I've temporarily solved the problem by dealing with repository issues. Do you have any suggestions in terms of Python version or gnome version I need to take care in the future? Thanks!
Joshrem avatar
tt flag
@user535733 Thank you very much! Sorry I didn't read this comment yesterday and solved it myself. I just followed some posts to adjust my repository settings and proxy settings and it worked. I think this answer is exactly the problem I encountered. Many thanks again.
Score:0
tt flag
  1. Change the port of my proxy and adjust my proxy setting in Linux accordingly (instead of 7890 by default). I don't know the mechanism in this and those not in China need not care about this problem. If you know why or how to prevent such errors, please do let me know!

  2. Reset my repository settings. I changed it by accident before knowing a bit about the repository definition and it turned out to be one of the main issues. I also set up the proxy and choose the one suggested by Ubuntu and it turned out to be not reliable. I switched to 'rule' pattern and chose one in mainland China and things worked out well.

If you meet with the same issues, you can start by making the proxy work properly and ensuring your repository settings are right.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.