How to recover static libraries through jumpdrive
#1
A while ago my pinephone had seemed to had have wifi, bluetooth, gsettings, and various other services disabled that I've addressed in my most recent few threads.

I currently have the phone connected to a pc through jumpdrive and have the / directory accessible. How can I recover the installation of arch-phosh.
  Reply
#2
Check man pacman.

Quote: --sysroot <dir>
Specify an alternative system root. Pacman will chroot and chdir into the system root prior to running. This allows mounted guest systems to be properly operated on. Any
other paths given will be interpreted as relative to the system root. Requires root privileges.
Quote:QUERY OPTIONS (APPLY TO -Q)
...
-k, --check
Check that all files owned by the given package(s) are present on the system. If packages are not specified or filter flags are not provided, check all installed packages.
Specifying this option twice will perform more detailed file checking (including permissions, file sizes, and modification times) for packages that contain the needed mtree
file.

'sudo pacman --sysroot <mountpoint> -Qk' will check for missing files in all installed packages.

If you find packages with missing files, 'sudo pacman --sysroot <mntpnt> -S <list of packages>' will reinstall the packages you specify.

Arch doesn't typically package static versions of libraries, and they'd only be relevant if you were building a statically linked executable against them. Did you mean dynamic libraries?
  Reply
#3
(11-18-2021, 04:42 PM)Dendrocalamus64 Wrote: Check man pacman.

Quote: --sysroot <dir>
Specify an alternative system root. Pacman will chroot and chdir into the system root prior to running. This allows mounted guest systems to be properly operated on. Any
other paths given will be interpreted as relative to the system root. Requires root privileges.
Quote:QUERY OPTIONS (APPLY TO -Q)
...
-k, --check
Check that all files owned by the given package(s) are present on the system. If packages are not specified or filter flags are not provided, check all installed packages.
Specifying this option twice will perform more detailed file checking (including permissions, file sizes, and modification times) for packages that contain the needed mtree
file.

'sudo pacman --sysroot <mountpoint> -Qk' will check for missing files in all installed packages.

If you find packages with missing files, 'sudo pacman --sysroot <mntpnt> -S <list of packages>' will reinstall the packages you specify.

Arch doesn't typically package static versions of libraries, and they'd only be relevant if you were building a statically linked executable against them. Did you mean dynamic libraries?

The libraries that had errors had .so.1 extensions.
Also: the output of
sudo pacman --sysroot /media/a -Qk | grep -n --invert-match "0 missing files"
is:
warning: uboot-pinephone: /boot/boot.txt (No such file or directory)
warning: uboot-pinephone: /boot/mkscr (No such file or directory)
warning: uboot-pinephone: /boot/u-boot-sunxi-with-spl-pinephone-492.bin (No such file or directory)
warning: uboot-pinephone: /boot/u-boot-sunxi-with-spl-pinephone-528.bin (No such file or directory)
warning: uboot-pinephone: /boot/u-boot-sunxi-with-spl-pinephone-552.bin (No such file or directory)
warning: uboot-pinephone: /boot/u-boot-sunxi-with-spl-pinephone-624.bin (No such file or directory)
warning: uboot-pinephone: /boot/u-boot-sunxi-with-spl-pinetab-492.bin (No such file or directory)
warning: uboot-pinephone: /boot/u-boot-sunxi-with-spl-pinetab-528.bin (No such file or directory)
warning: uboot-pinephone: /boot/u-boot-sunxi-with-spl-pinetab-552.bin (No such file or directory)
warning: uboot-pinephone: /boot/u-boot-sunxi-with-spl-pinetab-624.bin (No such file or directory)
error: could not open file /var/lib/pacman/local/udisks2-2.9.4-1/files: No such file or directory
  Reply
#4
Your thread: "file too short" problem causing many sofware dependencies to fail

(Just deleting system files is never going to help.)
Those are shared libraries, not static libraries.
Sounds like this:
AskUbuntu: error while loading shared libraries, file too short

/usr/lib/libQt5Core.so.5 is supposed to be a symlink. That's why it can be only 20 bytes and yet still point at the right target.
Code:
[rock@pbp lib]$ ls -al libQt5Core*
-rw-r--r-- 1 root root    1009 Oct 24 09:08 libQt5Core.prl
lrwxrwxrwx 1 root root      20 Oct 24 09:08 libQt5Core.so -> libQt5Core.so.5.15.2
lrwxrwxrwx 1 root root      20 Oct 24 09:08 libQt5Core.so.5 -> libQt5Core.so.5.15.2
lrwxrwxrwx 1 root root      20 Oct 24 09:08 libQt5Core.so.5.15 -> libQt5Core.so.5.15.2
-rwxr-xr-x 1 root root 5947104 Oct 24 09:08 libQt5Core.so.5.15.2

How did you install arch-phosh in the first place? Did you perhaps mount the install image on Windows and then copy the files over, like the guy on askubuntu, which caused all his symlinks to become regular files?
If so, you should reinstall properly rather than trying to unbork this one. At step 5 of the JumpDrive instructions, where it says to flash the exposed PinePhone drive with your chosen OS image, that means using a utility like dd or Etcher to flash the install image directly to the PinePhone's emmc.
  Reply
#5
(11-19-2021, 11:38 AM)Dendrocalamus64 Wrote: Your thread: "file too short" problem causing many sofware dependencies to fail

(Just deleting system files is never going to help.)
Those are shared libraries, not static libraries.
Sounds like this:
AskUbuntu: error while loading shared libraries, file too short

/usr/lib/libQt5Core.so.5 is supposed to be a symlink.  That's why it can be only 20 bytes and yet still point at the right target.
Code:
[rock@pbp lib]$ ls -al libQt5Core*
-rw-r--r-- 1 root root    1009 Oct 24 09:08 libQt5Core.prl
lrwxrwxrwx 1 root root      20 Oct 24 09:08 libQt5Core.so -> libQt5Core.so.5.15.2
lrwxrwxrwx 1 root root      20 Oct 24 09:08 libQt5Core.so.5 -> libQt5Core.so.5.15.2
lrwxrwxrwx 1 root root      20 Oct 24 09:08 libQt5Core.so.5.15 -> libQt5Core.so.5.15.2
-rwxr-xr-x 1 root root 5947104 Oct 24 09:08 libQt5Core.so.5.15.2

How did you install arch-phosh in the first place?  Did you perhaps mount the install image on Windows and then copy the files over, like the guy on askubuntu, which caused all his symlinks to become regular files?
If so, you should reinstall properly rather than trying to unbork this one.  At step 5 of the JumpDrive instructions, where it says to flash the exposed PinePhone drive with your chosen OS image, that means using a utility like dd or Etcher to flash the install image directly to the PinePhone's emmc.

Yeah I originally installed safely using dd, the phone was working fine for a while and I'd like to recover it rather than reinstall everything.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to install arch with jumpdrive, but jumpdrive isn't booting pineuser0 5 2,063 09-14-2021, 08:59 AM
Last Post: wibble

Forum Jump:


Users browsing this thread: 1 Guest(s)