Skip to content

Instantly share code, notes, and snippets.

@josejuansanchez
Last active November 18, 2020 23:25
Show Gist options
  • Select an option

  • Save josejuansanchez/64b4f168cb06b7df7bae1771dd1e8439 to your computer and use it in GitHub Desktop.

Select an option

Save josejuansanchez/64b4f168cb06b7df7bae1771dd1e8439 to your computer and use it in GitHub Desktop.
Instalación del libro digital 'GENERATION 1 Manuel Interactif' en Ubuntu 20.04
#!/bin/bash
set -x
# Habilitamos el uso de la arquitectura i386
sudo dpkg --add-architecture i386
sudo apt update
# Instalamos los paquetes
sudo apt install lib32z1 -y
sudo apt install libx11-6:i386 -y
sudo apt install libgtk2.0-0:i386 -y
sudo apt install libxt6:i386 -y
sudo apt install libsqlite3-0:i386 -y
sudo apt install libidn11:i386 -y
sudo apt install libxxf86vm1:i386 -y
sudo apt install libstdc++6:i386 -y
sudo apt install libcanberra-gtk-module:i386 -y
sudo apt install libasound2-plugins:i386 -y
sudo apt install libnss3:i386 -y
sudo apt install libcurl3-gnutls:i386 -y
sudo apt install libpangoxft-1.0-0:i386 -y

Análisis

Obtenemos información sobre el tipo de archivo

$ file exeLinux 
exeLinux: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.9, stripped

Con el comando ldd podemos detectar las librerías dinámicas que necesita el binario

$ ldd exeLinux 
	linux-gate.so.1 (0xf7f9d000)
	libX11.so.6 => not found
	libXt.so.6 => not found
	libgtk-x11-2.0.so.0 => not found
	libgdk-x11-2.0.so.0 => not found
	libpthread.so.0 => /lib32/libpthread.so.0 (0xf7f5e000)
	libgthread-2.0.so.0 => not found
	libsqlite3.so.0 => not found
	libidn.so.11 => not found
	libXxf86vm.so.1 => not found
	librt.so.1 => /lib32/librt.so.1 (0xf7f51000)
	libstdc++.so.6 => not found
	libm.so.6 => /lib32/libm.so.6 (0xf7e4d000)
	libgcc_s.so.1 => not found
	libc.so.6 => /lib32/libc.so.6 (0xf7c62000)
	libdl.so.2 => /lib32/libdl.so.2 (0xf7c5c000)
	/lib/ld-linux.so.2 (0xf7f9e000)
	libSM.so.6 => not found
	libgdk_pixbuf-2.0.so.0 => not found
	libpango-1.0.so.0 => not found
	libgobject-2.0.so.0 => not found
	libglib-2.0.so.0 => not found
	libXinerama.so.1 => not found

Solución

Paso 1. Habilitamos el uso de la arquitectura i386

sudo dpkg --add-architecture i386
sudo apt update

Paso 2. Instalamos los paquetes

sudo apt install lib32z1 -y
sudo apt install libx11-6:i386 -y
sudo apt install libgtk2.0-0:i386 -y
sudo apt install libxt6:i386 -y
sudo apt install libsqlite3-0:i386 -y
sudo apt install libidn11:i386 -y
sudo apt install libxxf86vm1:i386 -y
sudo apt install libstdc++6:i386 -y
sudo apt install libcanberra-gtk-module:i386 -y
sudo apt install libasound2-plugins:i386 -y
sudo apt install libnss3:i386 -y
sudo apt install libcurl3-gnutls:i386 -y 
sudo apt install libpangoxft-1.0-0:i386 -y 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment