Xubuntu 18.04 / 20.04 的 xfce4-weather-plugin 停止工作

Ter*_*nce 11 xfce xubuntu plugins weather

Xubuntu 18.04 和现在 20.04 的 xfce4-weather-plugin 已停止工作并显示“无数据”。

Ter*_*nce 12

2021 年 3 月 19 日更新: 今天刚刚收到关于他们将xfce4-weather-plugin0.10.2 版推送到没有此问题的焦点更新存储库的错误的更新。随意从 Ubuntu Repos 重新安装。


2021-03-04 更新: 由于关闭了 1.9 API,20.04 存储库中的插件版本最近停止工作: https ://api.met.no/blog/2021-02-04-extremeswwc于 3 月 1 日。

这影响了 Ubuntu 存储库中的 0.10.1 版本。下面的 git build 现在安装了 0.11.0 版本,它修复了这个问题。


这样做的原因是来自https://apt.met.no的 API更改了插件正在调用的版本号。

旧代码调用:https : //api.met.no/weatherapi/locationforecastlts/1.3

该页面给出了以下错误消息:

404 Not Found

Validation error

The specified version number is end-of-lifed for this product 
Run Code Online (Sandbox Code Playgroud)

API 期待:https : //api.met.no/weatherapi/locationforecast/2.0

我已经为此提交了一个错误报告,以将新的 API 添加到此处的代码中:

https://bugs.launchpad.net/ubuntu/+source/xfce4-weather-plugin/+bug/1895246

Xfce GitLab 上有一个错误:

https://gitlab.xfce.org/panel-plugins/xfce4-weather-plugin/-/issues/27


显然已经有一个修复推送到上游,它可以在git repo xfce4-weather-plugin 中使用,但有一个问题是xdt-autogen构建它所需的版本是 4.14.0。Xubuntu 18.04 中的版本最高为 4.12.0 版本。git 中正在寻找的版本在xfce4-dev-tools18.04的包中不可用。但是,我实际上能够通过对其autogen.sh脚本进行一些快速修改来获得要使用 4.12.0 版构建的 git 版本。我有以下说明。


Git 仓库安装:

我发现 18.04 附带的版本实际上在外面晚上显示时有问题,因为我看到只有下午 4 点时显示月亮的图标。我更新到版本,我相信是版本 0.10.1,在 git repo 中,并纠正了它。

从面板和删除现有插件后删除天气插件

sudo apt remove xfce4-weather-plugin
Run Code Online (Sandbox Code Playgroud)

现在添加先决条件:

sudo apt-get build-dep xfce4-weather-plugin
sudo apt install build-essential git
Run Code Online (Sandbox Code Playgroud)

或者

sudo apt install intltool libdbus-glib-1-dev libsoup2.4-dev libxfce4ui-1-dev libxfce4util-dev libxfconf-0-dev xfce4-dev-tools xfce4-panel-dev git build-essential
Run Code Online (Sandbox Code Playgroud)

如果运行 20.04 还安装以下内容:

sudo apt install libxfce4ui-2-dev libxfce4panel-2.0-dev
Run Code Online (Sandbox Code Playgroud)

注意: 所有这些-dev应用程序仅用于从源代码构建。安装过程完成后,您可以-dev安全地删除所有这些应用程序,因为它们不再需要。

现在获取 git 版本,构建并安装

git clone https://gitlab.xfce.org/panel-plugins/xfce4-weather-plugin.git
cd xfce4-weather-plugin/
Run Code Online (Sandbox Code Playgroud)

如果您运行的是 20.04 或更高版本,则不需要下一行:

sed -i 's/4.14.0/4.12.0/' autogen.sh
Run Code Online (Sandbox Code Playgroud)

继续构建:

./autogen.sh --prefix=/usr
make
sudo make install
Run Code Online (Sandbox Code Playgroud)

将天气插件重新添加到面板,它现在应该可以工作了。=)

它的快速截图:

在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

  • 我还需要安装依赖项 libxfce4ui-2-dev 和 libxfce4panel-2.0-dev。我使用的是 Ubuntu 20.04。 (2认同)