少女祈祷中...

试图解决gnome-software explore失效问题的失败尝试

发现商店页面无法正常显示各种软件

尝试完成了如下步骤中, 除了查看系统日志的所有步骤


gnome-software explore界面无法正常使用

报错为 gs_app_list_length: assertion ‘GS_IS_APP_LIST (list)’ failed
尝试清除缓存, 重装设置和重启安装器, 更新包和重装软件安装器. 还是没用

这个错误 gs_app_list_length: assertion 'GS_IS_APP_LIST (list)' failed 通常表示 GNOME 软件安装器 (gnome-software) 遇到了一些数据或缓存问题。可以尝试以下几种方法来解决这个问题:

1. 清理 GNOME 软件安装器缓存

有时候,损坏的缓存文件会导致 GNOME 软件安装器报错。可以删除缓存文件来解决此问题:

1
rm -rf ~/.cache/gnome-software

之后重新启动 GNOME 软件安装器,看看问题是否解决。

2. 重置 GNOME 软件安装器的设置

GNOME 软件安装器的配置文件可能损坏,可以尝试重置它:

1
dconf reset -f /org/gnome/software/

3. 重启 GNOME 软件安装器

如果上述方法无效,可以尝试完全退出并重新启动 GNOME 软件安装器:

1
2
sudo killall gnome-software
gnome-software

4. 更新 GNOME 软件包

确保系统中的 GNOME 软件包是最新的,因为一些错误可能在更新中已经修复:

1
2
sudo apt update
sudo apt upgrade

5. 重装 GNOME 软件安装器

如果问题仍然存在,考虑重新安装 GNOME 软件安装器:

1
2
sudo apt remove --purge gnome-software
sudo apt install gnome-software

6. 检查系统日志

如果错误仍然存在,可以通过以下命令查看更详细的系统日志,以帮助定位问题:

1
journalctl -xe

在日志中查找与 gnome-software 相关的错误信息,以便获取更多的诊断线索。

这些方法应该有助于解决 GNOME 软件安装器中出现的 gs_app_list_length 错误。如果仍然无法解决,可以考虑使用 aptsnap 等命令行工具来安装软件,作为临时替代方案。


问题依然没有解决.

命令行运行时发现如下报错

在未更改镜像源的情况下, 报错为

sudo gnome-software
23:49:00:0630 Gs not handling error failed for action refresh: E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy/InRelease
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-backports/InRelease
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-security/InRelease
E: Failed to fetch https://ppa.launchpadcontent.net/appimagelauncher-team/stable/ubuntu/dists/jammy/InRelease
E: Failed to fetch https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/InRelease
E: Failed to fetch https://packages.microsoft.com/repos/edge/dists/stable/InRelease
E: Failed to fetch https://packages.microsoft.com/repos/code/dists/stable/InRelease
E: Some index files failed to download. They have been ignored, or old ones used instead.

而正常 ping archive.ubuntu.com可以ping 通.

在发现可能是代理问题之后, 尝试


要让 gnome-software 在使用代理的情况下正常工作,你可以按以下步骤配置代理:

1. 配置系统级代理

在 GNOME 设置中设置代理,使 gnome-software 能够继承系统的代理设置:

  1. 打开“设置”(Settings),选择“网络”(Network)。
  2. 点击右下角的“网络代理”(Network Proxy),选择“手动”并配置 HTTP、HTTPS、FTP 和 SOCKS 代理。
  3. 配置完成后,点击“应用系统范围内的设置”或确保该代理适用于系统全局。

2. 为 apt 配置代理

即使系统代理设置成功,有时 gnome-software 使用的 apt 仍然需要单独配置代理:

  1. 打开终端,编辑 /etc/apt/apt.conf.d/proxy.conf 文件(如果该文件不存在,可以创建一个):

    1
    sudo nano /etc/apt/apt.conf.d/proxy.conf
  2. 添加以下行来配置 HTTP 和 HTTPS 代理(替换为你的代理地址和端口):

    1
    2
    Acquire::http::Proxy "http://your-proxy-address:port";
    Acquire::https::Proxy "http://your-proxy-address:port";
  3. 保存并退出文件。

3. 设置环境变量

某些代理配置还可以通过环境变量设置,使 gnome-software 能在代理环境下正常工作:

  1. 打开终端,编辑 ~/.bashrc 文件:

    1
    nano ~/.bashrc
  2. 添加以下环境变量(替换为你的代理地址和端口):

    1
    2
    3
    4
    export http_proxy="http://your-proxy-address:port"
    export https_proxy="http://your-proxy-address:port"
    export ftp_proxy="http://your-proxy-address:port"
    export no_proxy="localhost,127.0.0.1,::1"
  3. 保存文件并在终端运行以下命令以应用更改:

    1
    source ~/.bashrc

4. 重启 gnome-software

完成这些设置后,重新启动 gnome-software 以确保新代理设置生效。


配置完环境变量和系统设置后, 依然无效.

尝试更换软件源. 依然报错

sudo gnome-software
not handling error failed for action refresh: E: Failed to fetch http://mirrors.huaweicloud.com/repository/ubuntu/dists/jammy/InRelease
E: Failed to fetch http://mirrors.huaweicloud.com/repository/ubuntu/dists/jammy-updates/InRelease
E: Failed to fetch http://mirrors.huaweicloud.com/repository/ubuntu/dists/jammy-backports/InRelease
E: Failed to fetch http://mirrors.huaweicloud.com/repository/ubuntu/dists/jammy-security/InRelease
E: Failed to fetch https://ppa.launchpadcontent.net/appimagelauncher-team/stable/ubuntu/dists/jammy/InRelease
E: Failed to fetch https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/InRelease
E: Failed to fetch https://packages.microsoft.com/repos/edge/dists/stable/InRelease
E: Failed to fetch https://packages.microsoft.com/repos/code/dists/stable/InRelease
E: Some index files failed to download. They have been ignored, or old ones used instead.

这是在已经将镜像源更改为华为源的情况下, 依然发生的问题.


总之搞了半天还是没搞好.