Harshvardhan Arora
Harshvardhan Arora

Reputation: 103

Running a 64-bit shell script on a 32-bit Linux architecture

I have a 32-bit Linux OS on which I want to run a 64-bit Shell script. The source provider of the script cannot provide a 32-bit version and the file is pretty huge (900 MB).

Upvotes: 0

Views: 681

Answers (1)

dash-o
dash-o

Reputation: 14491

Given little details about the script and system, the answer is also very general ...

Assuming the code is actually a shell script.

The top level script is probably an installer - "self-exploding" ZIP/tar, with the abinaries encoded as text. The script itself only validate the system configuration. From the comments look like software update.

One important question is about the binaries that will be created. If they are 64 bit, you will not be able to run them on a 32 bit environment. If your system is legacy, you might be behind on system libraries.


If (unlikely) the binaries are built to run as 32-bit, and only the installer itself required 64-bit, consider these options:

  • Run the installer on 64 bit environment, directing the installation into new folder (/opt/mysoftware-1.2, or similar), then copy/tar all the created tree to the 32 bit system, including any environment/startup script. With luck, it might work.

  • Alternatively, review the (installer) script, and try to see if possible to 'cheat'. May be the installer support environment variables that you can overwrite

  • Consider upgrading the system to 64, and install legacy 32 libraries, while you can still find 32 bit libraries available. For work experience, we were able to run lot of 32 system libraries for 64 bit RedHat 6 (now obsolete).

    32-bit multiarch executables and libraries on a 64-bit system will be supported longer than fully 32-bit kernel + user-space by most distros.

Upvotes: 2

Related Questions