我是 ubuntu 新手,安装了 Ubuntu 22.04.2 LTS 64 位和 Gnome 版本 42.5。我和windows一起安装了linux。我大学的导师要求使用ubuntu版本。
但是当我尝试使用 GUI 或终端安装某些东西时,问题开始出现。例如,我现在无法打开“Ubuntu Software”,我昨天曾经打开它,但它也没有正常显示,当我单击任何内容时,软件中心直接崩溃了。
我在 ubuntu 上做过的事情:安装主题如下https://itsfoss.com/best-gtk-themes/。安装deepin-winehttps://github.com/zq1997/deepin-wine https://github.com/zq1997/deepin-wine安装微信。
顺便说一句,因为我在中国大陆,所以我必须设置代理,我使用“手动”设置网络代理 -> HTTP 代理:127.0.0.1; 7890 /// HTTPs 代理: 127.0.0.1; 7890.我不知道这是否正确,因为我以前没有经验。但是我现在可以访问所有国外网站,例如youtube,这些网站没有代理就无法访问。我在下面的试验中添加的清华服务器也是我的导师推荐的,但它不能正常工作。
我也无法在终端中安装东西。例如,如果我输入
sudo apt install wine
终端告诉我
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.
在software&Update中,我启用了前四个选项,并从在ubuntu提供的测试中表现最好的马来西亚服务器下载。而在第二节中抱歉,我没有像样的截图软件,因为我也无法安装
我可能做了一些不当的事情,意外地删除了一些服务器。
如果我输入
$ 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
我还按照老师的要求成功安装了以下软件包(使用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
我尝试过的其他帖子提供的解决方案:
~$ 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
这样做之后我发现我之前卸载的“软件”(而不是Ubuntu软件)又出现了。但也无法正常动作。
索引页面看起来不错,但是当我单击目录中的任何项目时,就会出现错误。之后,如果我点击任何软件,它就会崩溃。
$ 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.
我还尝试了这两篇文章中包含的其他方法:https://www.maketecheasier.com/ubuntu-software-center-not-working-fixes/ https://itslinuxfoss.com/ubuntu-software-center-not-loading/ 我确信它们都不适合我。应该是我的代理或者网络设置的问题。实际上,当我第一次安装ubuntu时,我无法访问ubuntu自带的“软件”,安装完成后它告诉我可以访问软件中心中的许多有用的软件,但当时我无法打开它。
请帮帮我,这对我来说非常重要!非常感谢。如果需要提供任何其他信息,请告诉我。