Score:2

How to change Architecture from AARCH64 to x86_64 for package installation

bj flag

I am on Windows 11 using WSL to download and use Solana and Anchor since Anchor doesnt work on Windows and I am trying to change my Architecture from AARCH64 to x86_64.

My default Architecture and HOST_TRIPLE is AARCH64 && AARCH64-unknown-linux-gnu

I cant change my default HOST_TRIPLE to x86_64-unknown-linux-gnu because Cargo doesnt recognize this but when keeping it as AARCH64-unknown-linux-gnu solana doesnt have a package under aarch64, it is looking for x86_64-unknown-linux-gnu.

To get around this I downloaded the prebuilt binaries and installed from there but when I run the 'solana' command I get this error:

bash: /home/user/solana-release/bin/solana: cannot execute binary file: Exec format error

I see from here: https://www.cyberithub.com/solved-cannot-execute-binary-file-exec-format-error/

He says he changed his architecture to fix this but I couldn't gather how he changed it or where to install the correct package I need.

pl flag
What hardware are you attempting this on? Is it some kind of Windows Surface with an Qualcomm CPU?
Doughp avatar
bj flag
@popey yes it is a Qualcomm CPU
Doughp avatar
bj flag
Not advice but, If anybody else ever runs into this issue you can use a Online IDE like here https://beta.solpg.io/ be safe of course and do your own DD.
Score:2
pl flag

It looks like you're trying to run Solana x86_64 (Intel/AMD 64-bit code) on a machine with an ARM based (Qualcomm) processor.

This isn't likely going to work. I note that on the releases page there are no packages for arm64/aarch64 architecture, which your CPU requires. You could potentially run it in a virtual machine via QEMU, but that doesn't performant.

There is an issue on the solana bug tracker which suggests they're not going to support arm64 builds for Linux due to lack of resources.

Doughp avatar
bj flag
This is strictly for ARM on Linux? Solana works fine in regular Windows its just adding Anchor into the process forces me to move to Linux. Thank you for your help and responsiveness as well.
pl flag
I know next to nothing about the software you're running, sorry. I just assume that if you're running WSL, that means Linux, the processor you have dictates the architecture (AARCH64/ARM64 (it has a few names)). You appear to have downloaded the x86 (64-bit X86) binary, which won't run inside a WSL machine on Windows. You'll need another computer with an Intel or AMD processor, I suspect.
Doughp avatar
bj flag
Okay thank you so much, and sorry to make you re-iterate haha. Enjoy your day.
pl flag
No problemo! Have a great weekend.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.