ELF interpreter /lib64/ld-linux-x86-64.so.2 not found, error 2问题解决以及localsentd软件在Ubuntu兼容层的安装

ELF interpreter /lib64/ld-linux-x86-64.so.2 not found

不知道怎么回事,Ubuntu兼容层突然出了问题,执行命令报错:

ELF interpreter /lib64/ld-linux-x86-64.so.2 not found, error 2

尝试把另一个发行版里面的ld-linux-x86-64.so.2文件cp过来,报错:

skywalk@fb98:~ $ sudo cp /compat/linux/lib64/ld-linux-x86-64.so.2 /compat/ubuntu/lib64/ld-linux-x86-64.so.2

报错信息:*** stack smashing detected ***: terminated
Abort trap (core dumped)

后来还是在Ubuntu系统里找到了文件,做了个ln连接过去:

lrwxr-xr-x 1 root root 44 Jul 22 09:07 /lib64/ld-linux-x86-64.so.2 -> ../lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
现在正常了!

运行localsend报错

在FreeBSD的ubuntu兼容环境下,运行localsend报错:

root@fb98:/bin# localsend_app
localsend_app: error while loading shared libraries: libayatana-appindicator3.so.1: cannot open shared object file: No such file or directory
root@fb98:/bin# apt install -f
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Can not write log (Is /dev/pts mounted?) - posix_openpt (2: No such file or directory)
Setting up snapd (2.76+ubuntu22.04.1) ...
unable to set CAP_SETFCAP effective capability: Operation not permitted
dpkg: error processing package snapd (--configure):
installed snapd package post-installation script subprocess returned error exit
status 1
Errors were encountered while processing:
snapd
E: Sub-process /usr/bin/dpkg returned an error code (1)

缺少依赖库的问题,缺少依赖库‌:localsend_app需要libayatana-appindicator3-1,但该库未安装。

安装上它

apt-get install -y libayatana-appindicator3-1

好了,现在报错变成这样了:

root@fb98:/# localsend_app

(localsend_app:18200): Gtk-WARNING **: 14:00:05.991: cannot open display:
root@fb98:/# localsend_app :0

翻看以前的记录在FreeBSD系统使用chroot进入Ubuntu仿真环境使用Localsend软件发送和接受文件_软件包 gir1.2-appindicator3-0.1 没有可安装候选-CSDN博客,用这句

export DISPLAY=:0

但是这次不行啊

明白了,还需要在宿主机里设置:

xhost +local:

可以启动了,现在启动之后,程序显示:No GL implementation is available

安装缺失的 Linux 图形库
在 Chroot 环境内部,LocalSend 需要 Linux 版本的 Mesa OpenGL 库。即使 FreeBSD 宿主机有 Mesa,Chroot 内的 Ubuntu 环境也需要自己的副本。

在 Chroot 内部执行:‌

bash
apt-get update
apt-get install -y libgl1-mesa-glx libegl1-mesa libglx0 libdrm2 libgbm1

现在启动有新的报错:No available configurations for the given RGBA pixel format

在 FreeBSD 的 Linux 兼容层中,这通常意味着 ‌Mesa 库缺失‌、‌DRM 设备未映射‌ 或 ‌X11 转发配置不完整‌。请按照以下步骤逐步解决:

1. 安装缺失的 Mesa OpenGL 库

LocalSend 基于 Flutter,需要完整的 OpenGL 支持。Chroot 环境中可能缺少必要的 Mesa 库。

在 Chroot 内部执行:

apt-get update apt-get install -y libgl1-mesa-glx libegl1-mesa libglx0 libdrm2 libgbm1 libwayland-client0

问题未解决

先搁置