GPG verification error

Hi I’m trying to install x2goserver from AUR

It installed successfully in my laptop, but cannot be installed in my PC.

Both of them installed the same system (manjaro xfce)

Error report:

    x2goserver-4.1.0.6.tar.gz ... cat: 写入错误: 断开的管道
未找到签名
失败
==> 错误: 一个或多个 PGP 签名无法校验!

It says:

“write error: broken pipe”
“cannot find signature”

How can I fix this?? Thanks so much


BTW I’m installing it through ssh, would that effect??

… you are logged in via ssh and are doing … what, exactly?

prepend the command with:
LC_ALL=C
so the output will be in english, which likely many more people here can read …

example:
LC_ALL=C yay -S whatever_software

1 Like

1 │ Version : 4.1.0.6-1 available on Unstable Branch

Remember this - as AUR isn’t supported otherwise.

Check output:

pacman-mirrors -G
[shore@shore-systemproductname manjaro_note]$ pacman-mirrors -G
stable

I’m able to install it on my laptop

Haven’t install yay, and seems doesn’t work…

[shore@shore-systemproductname manjaro_note]$ LC_ALL=C sudo pamac install x2goserver
[sudo] password for shore: 
Warning: x2goserver is only available from AUR
Preparing...
Cloning x2goserver build files...
Running as unit: run-u278.service
致命错误:不是 git 仓库(或者直至挂载点 /var/cache/private 的任何父目录)
停止在文件系统边界(未设置 GIT_DISCOVERY_ACROSS_FILESYSTEM)。
Finished with result: exit-code
Main processes terminated with: code=exited, status=128/n/a
Service runtime: 36ms
CPU time consumed: 5ms
Memory peak: 1.6M (swap: 0B)
Running as unit: run-u279.service
Finished with result: success
Main processes terminated with: code=exited, status=0/SUCCESS
Service runtime: 6ms
CPU time consumed: 6ms
Memory peak: 2.1M (swap: 0B)
Running as unit: run-u280.service
提示: 使用 'master' 作为初始分支的名称。这个默认分支名称可能会更改。要在新仓库中
提示: 配置使用初始分支名,并消除这条警告,请执行:
提示:
提示:  git config --global init.defaultBranch <名称>
提示:
提示: 除了 'master' 之外,通常选定的名字有 'main'、'trunk' 和 'development'。
提示: 可以通过以下命令重命名刚创建的分支:
提示:
提示:  git branch -m <name>
提示: 使用 'master' 作为初始分支的名称。这个默认分支名称可能会更改。要在新仓库中
提示: 配置使用初始分支名,并消除这条警告,请执行:
提示:
提示:  git config --global init.defaultBranch <名称>
提示:
提示: 除了 'master' 之外,通常选定的名字有 'main'、'trunk' 和 'development'。
提示: 可以通过以下命令重命名刚创建的分支:
提示:
提示:  git branch -m <name>
Finished with result: success
Main processes terminated with: code=exited, status=0/SUCCESS
Service runtime: 1.288s
CPU time consumed: 24ms
Memory peak: 5.4M (swap: 0B)
Generating x2goserver information...
Running as unit: run-u281.service
Finished with result: success
Main processes terminated with: code=exited, status=0/SUCCESS
Service runtime: 687ms
CPU time consumed: 731ms
Memory peak: 10.8M (swap: 0B)
Checking x2goserver dependencies...
Resolving dependencies...
Checking inter-conflicts...

To build (1):
  x2goserver  4.1.0.6-1    AUR


Edit build files : [e] 
Apply transaction ? [e/y/N] y


Building x2goserver...
Running as unit: run-u282.service
Press ^] three times within 1s to disconnect TTY.
==> 正在创建软件包:x2goserver 4.1.0.6-1 (2025年01月11日 星期六 23时05分29秒)
==> 正在检查运行时依赖关系...
==> 正在检查编译时依赖关系
==> 获取源代码...
  -> 正在下载 x2goserver-4.1.0.6.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  174k  100  174k    0     0   141k      0  0:00:01  0:00:01 --:--:--  141k
  -> 正在下载 x2goserver-4.1.0.6.tar.gz.asc...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   488  100   488    0     0    690      0 --:--:-- --:--:-- --:--:--   690
  -> 找到 tmpfiles.d
  -> 找到 sysusers.d
  -> 找到 reproducible-man-gzip.patch
==> 正在验证 source 文件,使用sha256sums...
    x2goserver-4.1.0.6.tar.gz ... 通过
    x2goserver-4.1.0.6.tar.gz.asc ... 已跳过
    tmpfiles.d ... 通过
    sysusers.d ... 通过
    reproducible-man-gzip.patch ... 通过
==> 正在使用 gpg 验证源文件签名...
    x2goserver-4.1.0.6.tar.gz ... cat: 写入错误: 断开的管道
未找到签名
失败
==> 错误: 一个或多个 PGP 签名无法校验!
Finished with result: exit-code
Main processes terminated with: code=exited, status=1/FAILURE
Service runtime: 2.541s
CPU time consumed: 623ms
Memory peak: 10.8M (swap: 0B)
Error: Failed to build x2goserver
[shore@shore-systemproductname manjaro_note]$ 

Please do not use sudo with pamac. It uses polkit and will ask for authentication when needed. Otherwise, you end up with incorrect ownership/permissions. :wink:

3 Likes

I’m curious if it’s feasible to build in a protection against this.

I remember in my first few months completely confusing and mis-spelling pacman and pamac…

So, in the interests of a solution I would propose a quick guide for the OP right here:
Perhaps interesting for @TeaM for a built-in noob protection.

sudo touch /usr/local/bin/pamac
sudo chmod +x /usr/local/bin/pamac
sudo nano /usr/local/bin/pamac
#!/bin/bash

if [[ $(ps -o comm= $PPID) == "sudo" ]]; then
    echo "Warning: Do not use 'sudo' with 'pamac'. It can cause permission issues."
    exit 1
fi

/usr/bin/pamac "$@"

So have at it:

sudo pamac install x2goserver

4 Likes

A very nice fix to a longstanding issue. You might also want to look at using the Effective UID (which is 0 for root):

#!/bin/bash

if [[ $EUID -eq 0 ]]; then
    echo "Warning: Do not use 'pamac' with 'root' privileges. It can cause permission issues."
    exit 1
fi

/usr/bin/pamac "$@"

This will protect against pamac being run as root using sudo, run0 or su:

   ~  sudo pamac install x2goserver 
Warning: Do not use 'pamac' with 'root' privileges. It can cause permission issues.
    ~  run0 pamac install x2goserver 
Warning: Do not use 'pamac' with 'root' privileges. It can cause permission issues.
    ~  su
Password: 
[scott-ser scotty]# pamac install x2goserver
Warning: Do not use 'pamac' with 'root' privileges. It can cause permission issues.

I can’t imagine any case where a user would need to run pamac as root, even if they are unable to log in as a normal user for some reason. pacman would be the goto in that type of situation.

3 Likes

The thing is pamac is aware of root/sudo/user0 … and even has contingencies for when it is run this way.

I recognized this even when submitting a PR to disallow running this way but it was rejected on the grounds that pamac is intended to be able to be run under these circumstances.

Obviously … it still breaks things when run this way … so … :person_shrugging:

4 Likes

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