Sample Header Ad - 728x90

Error while loading shared libraries: libreadline.so.7

1 vote
0 answers
1374 views
I am trying to install the Agena programming language for a school project on Arch Linux. There is no package in the AUR, so I am trying to make my own PKGBUILD file. I think I have managed to install it, but when I try to run it, I get this error.
agena: error while loading shared libraries: libreadline.so.7: cannot open shared object file: No such file or directory
However, I have installed the readline7 package from the AUR, and there is in fact a symlink usr/lib/readline.so.7 When I try to run agenaedit which is an IDE that comes with the language (in the same deb file) I get a similar error, but with libXext.so.6, which is also already located in /usr/lib/ (I didn't need to install anything for this one) Here is what I have so far as my PKGBUILD. The steps I have gone through to install it are in the prepare and package functions. (This is my first PKGBUILD, so if I am doing anything wrong, please let me know in the comments.)
_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
}
### Edit Here is the output of 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 +++
Asked by Abraham Murciano Benzadon (131 rep)
Oct 19, 2020, 08:19 PM
Last activity: Oct 20, 2020, 12:18 PM