我正在尝试在 Arch Linux 上为学校项目安装 Agena 编程语言。 AUR 中没有包,因此我尝试制作自己的 PKGBUILD 文件。我想我已经成功安装它,但是当我尝试运行它时,出现此错误。
agena: error while loading shared libraries: libreadline.so.7: cannot open shared object file: No such file or directory
但是,我已经从 AUR 安装了 readline7 软件包,实际上有一个符号链接usr/lib/readline.so.7
当我尝试运行agenaedit
which 是该语言附带的 IDE(在同一个 deb 文件中)时,我收到类似的错误,但是 with libXext.so.6
,它也已经位于/usr/lib/
(我不需要为此安装任何内容)
这是我目前为止所拥有的 PKGBUILD。我安装它的步骤是在准备和打包功能中。 (这是我的第一个 PKGBUILD,所以如果我做错了什么,请在评论中告诉我。)
_pkgname="agena"
pkgname="$_pkgname-bin"
pkgver="2.22.0"
pkgrel=1
pkgdesc="An easy-to-learn procedural programming language designed to be used in science, scripting, and many other applications."
arch=('x86_64')
url="http://$_pkgname.sourceforge.net/"
license=('GPL')
groups=()
depends=("readline7" "git" "curl")
makedepends=()
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=("https://master.dl.sourceforge.net/project/agena/Binaries/Agena%20$pkgver/$_pkgname-$pkgver-linux.i386.deb")
noextract=()
md5sums=()
validpgpkeys=()
prepare() {
# extract data.tar.xz from the .deb file
ar p $_pkgname-$pkgver-linux.i386.deb data.tar.xz | tar x -J
# download readline7 library (and its gpg key)
git clone https://aur.archlinux.org/readline7.git
curl https://tiswww.case.edu/php/chet/gpgkey.asc --output chet.asc
gpg --import chet.asccd
rm chet.asc
}
package() {
# copy .deb contents to /usr
cp -r usr /
# install readline7
cd readline7
makepkg -si --asdeps
}
编辑
这是 的输出strace agena
。
execve("/usr/local/bin/agena", ["agena"], 0x7ffe745ab990 /* 55 vars */) = 0
[ Process PID=6296 runs in 32 bit mode. ]
brk(NULL) = 0x57d7e000
arch_prctl(0x3001 /* ARCH_??? */, 0xffc0efc8) = -1 EINVAL (Invalid argument)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=169663, ...}) = 0
mmap2(NULL, 169663, PROT_READ, MAP_PRIVATE, 3, 0) = 0xf7eb1000
close(3) = 0
openat(AT_FDCWD, "/usr/lib32/libm.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\302\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=833360, ...}) = 0
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf7eaf000
mmap2(NULL, 835600, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xf7de2000
mmap2(0xf7dee000, 557056, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xc000) = 0xf7dee000
mmap2(0xf7e76000, 225280, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x94000) = 0xf7e76000
mmap2(0xf7ead000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xca000) = 0xf7ead000
close(3) = 0
openat(AT_FDCWD, "/usr/lib32/libdl.so.2", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 \22\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=17880, ...}) = 0
mmap2(NULL, 20532, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xf7ddc000
mmap2(0xf7ddd000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0xf7ddd000
mmap2(0xf7ddf000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0xf7ddf000
mmap2(0xf7de0000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0xf7de0000
close(3) = 0
openat(AT_FDCWD, "/usr/lib32/tls/i686/sse2/libreadline.so.7", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/usr/lib32/tls/i686/sse2", 0xffc0e3f0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib32/tls/i686/libreadline.so.7", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/usr/lib32/tls/i686", 0xffc0e3f0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib32/tls/sse2/libreadline.so.7", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/usr/lib32/tls/sse2", 0xffc0e3f0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib32/tls/libreadline.so.7", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/usr/lib32/tls", 0xffc0e3f0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib32/i686/sse2/libreadline.so.7", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/usr/lib32/i686/sse2", 0xffc0e3f0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib32/i686/libreadline.so.7", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/usr/lib32/i686", 0xffc0e3f0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib32/sse2/libreadline.so.7", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/usr/lib32/sse2", 0xffc0e3f0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib32/libreadline.so.7", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/usr/lib32", {st_mode=S_IFDIR|0755, st_size=24576, ...}) = 0
writev(2, [{iov_base="agena", iov_len=5}, {iov_base=": ", iov_len=2}, {iov_base="error while loading shared libra"..., iov_len=36}, {iov_base=": ", iov_len=2}, {iov_base="libreadline.so.7", iov_len=16}, {iov_base=": ", iov_len=2}, {iov_base="cannot open shared object file", iov_len=30}, {iov_base=": ", iov_len=2}, {iov_base="No such file or directory", iov_len=25}, {iov_base="\n", iov_len=1}], 10agena: error while loading shared libraries: libreadline.so.7: cannot open shared object file: No such file or directory
) = 121
exit_group(127) = ?
+++ exited with 127 +++