# Installed binary distribution for Linux aarch64 - but cannot execute binaries

**URL:** https://discourse.cmake.org/t/installed-binary-distribution-for-linux-aarch64-but-cannot-execute-binaries/5037
**Category:** Usage
**Created:** [February 17, 2022, 1:10am UTC](https://discourse.cmake.org/t/installed-binary-distribution-for-linux-aarch64-but-cannot-execute-binaries/5037 "2022-02-17T01:10:06Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![tomoreilly](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@tomoreilly](https://discourse.cmake.org/u/tomoreilly)
#### Post date: [February 17, 2022, 1:10am UTC](https://discourse.cmake.org/t/installed-binary-distribution-for-linux-aarch64-but-cannot-execute-binaries/5037/1 "2022-02-17T01:10:06Z")

</div>

I’m running ubuntu-14.04 (yep, quite old). Architecture is aarch64:

```auto
$ uname -m
aarch64

```

I downloaded the binary installer script cmake-3.23.0-rc1-linux-aarch64.sh [from the downloads page](https://cmake.org/download/), and run that script. I can see that it’s installed binaries, but when I cd to the bin/ directory and try to run cmake, bash cannot find the executable:

```auto
$ cd cmake-3.22.2-linux-aarch64/bin
smc@smc-2:~/cmake-3.22.2-linux-aarch64/bin$ ls -l
total 81864
-rwx------ 1 smc smc 13337496 Jan 25 14:03 ccmake
-rwx--x--x 1 smc smc 13336832 Jan 25 14:03 cmake
-rwx------ 1 smc smc 28696776 Jan 25 14:03 cmake-gui
-rwx------ 1 smc smc 13729520 Jan 25 14:03 cpack
-rwx------ 1 smc smc 14714992 Jan 25 14:03 ctest
smc@smc-2:~/cmake-3.22.2-linux-aarch64/bin$ ./cmake --version
-bash: ./cmake: No such file or directory

```

Why would this be? I see the same error when trying to execute any of the binaries in the bin/ directory. Have I somehow installed the wrong architecture?  
Thanks!

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [February 17, 2022, 1:26am UTC](https://discourse.cmake.org/t/installed-binary-distribution-for-linux-aarch64-but-cannot-execute-binaries/5037/2 "2022-02-17T01:26:28Z")

</div>

Your permissions look very odd. Can you try `chmod 644 bin/*` and `chmod 755 bin/` (both from the top-level extracted directory)? I suspect other directories may need some help here.

---

<div class="post-metadata">

### Author: ![tomoreilly](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@tomoreilly](https://discourse.cmake.org/u/tomoreilly)
#### Post date: [February 17, 2022, 4:55pm UTC](https://discourse.cmake.org/t/installed-binary-distribution-for-linux-aarch64-but-cannot-execute-binaries/5037/3 "2022-02-17T16:55:04Z")

</div>

Thanks, just tried this, but get same error: -bash: bin/cmake: No such file or directory

```auto
$ chmod 644 bin/*
smc@smc-2:~/cmake-3.22.2-linux-aarch64$ ls -l bin
total 81864
-rw-r--r-- 1 smc smc 13337496 Jan 25 14:03 ccmake
-rw-r--r-- 1 smc smc 13336832 Jan 25 14:03 cmake
-rw-r--r-- 1 smc smc 28696776 Jan 25 14:03 cmake-gui
-rw-r--r-- 1 smc smc 13729520 Jan 25 14:03 cpack
-rw-r--r-- 1 smc smc 14714992 Jan 25 14:03 ctest
# bin/ files not executable
$ chmod 755 bin/*
smc@smc-2:~/cmake-3.22.2-linux-aarch64$ ls -l bin
total 81864
-rwxr-xr-x 1 smc smc 13337496 Jan 25 14:03 ccmake
-rwxr-xr-x 1 smc smc 13336832 Jan 25 14:03 cmake
-rwxr-xr-x 1 smc smc 28696776 Jan 25 14:03 cmake-gui
-rwxr-xr-x 1 smc smc 13729520 Jan 25 14:03 cpack
-rwxr-xr-x 1 smc smc 14714992 Jan 25 14:03 ctest
smc@smc-2:~/cmake-3.22.2-linux-aarch64$ bin/cmake
-bash: bin/cmake: No such file or directory
smc@smc-2:~/cmake-3.22.2-linux-aarch64$

```

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [February 17, 2022, 5:14pm UTC](https://discourse.cmake.org/t/installed-binary-distribution-for-linux-aarch64-but-cannot-execute-binaries/5037/4 "2022-02-17T17:14:50Z")

</div>

Ah, sorry about the 644/755 thing. Hmm. I am starting to think that the “No such file or directory” is for the ELF interpreter. What is the output of `readelf -l bin/cmake`?

---

<div class="post-metadata">

### Author: ![tomoreilly](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@tomoreilly](https://discourse.cmake.org/u/tomoreilly)
#### Post date: [February 17, 2022, 5:37pm UTC](https://discourse.cmake.org/t/installed-binary-distribution-for-linux-aarch64-but-cannot-execute-binaries/5037/5 "2022-02-17T17:37:05Z")

</div>

```auto
$ readelf -l bin/cmake

Elf file type is EXEC (Executable file)
Entry point 0x438310
There are 10 program headers, starting at offset 64

Program Headers:
  Type Offset VirtAddr PhysAddr
                 FileSiz MemSiz Flags Align
  PHDR 0x0000000000000040 0x0000000000400040 0x0000000000400040
                 0x0000000000000230 0x0000000000000230 R E 8
  INTERP 0x0000000000000270 0x0000000000400270 0x0000000000400270
                 0x000000000000001b 0x000000000000001b R 1
      [Requesting program interpreter: /lib/ld-linux-aarch64.so.1]
  LOAD 0x0000000000000000 0x0000000000400000 0x0000000000400000
                 0x0000000000c735c4 0x0000000000c735c4 R E 10000
  LOAD 0x0000000000c78940 0x0000000001088940 0x0000000001088940
                 0x000000000003eec8 0x000000000004cfd8 RW 10000
  DYNAMIC 0x0000000000cae218 0x00000000010be218 0x00000000010be218
                 0x0000000000000220 0x0000000000000220 RW 8
  NOTE 0x000000000000028c 0x000000000040028c 0x000000000040028c
                 0x0000000000000044 0x0000000000000044 R 4
  TLS 0x0000000000c78940 0x0000000001088940 0x0000000001088940
                 0x0000000000000000 0x0000000000000010 R 8
  GNU_EH_FRAME 0x0000000000ab68f4 0x0000000000eb68f4 0x0000000000eb68f4
                 0x000000000002b994 0x000000000002b994 R 4
  GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000
                 0x0000000000000000 0x0000000000000000 RW 10
  GNU_RELRO 0x0000000000c78940 0x0000000001088940 0x0000000001088940
                 0x00000000000376c0 0x00000000000376c0 R 1

 Section to Segment mapping:
  Segment Sections...
   00     
   01 .interp 
   02 .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt .init .plt .text .fini .rodata .eh_frame_hdr .eh_frame .gcc_except_table 
   03 .init_array .fini_array .data.rel.ro .dynamic .got .got.plt .data .bss 
   04 .dynamic 
   05 .note.ABI-tag .note.gnu.build-id 
   06 .tbss 
   07 .eh_frame_hdr 
   08     
   09 .init_array .fini_array .data.rel.ro .dynamic .got

```

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [February 17, 2022, 5:38pm UTC](https://discourse.cmake.org/t/installed-binary-distribution-for-linux-aarch64-but-cannot-execute-binaries/5037/6 "2022-02-17T17:38:31Z")

</div>

Does `/lib/ld-linux-aarch64.so.1` exist?

---

<div class="post-metadata">

### Author: ![tomoreilly](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@tomoreilly](https://discourse.cmake.org/u/tomoreilly)
#### Post date: [February 17, 2022, 5:41pm UTC](https://discourse.cmake.org/t/installed-binary-distribution-for-linux-aarch64-but-cannot-execute-binaries/5037/7 "2022-02-17T17:41:38Z")

</div>

No it does not

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [February 17, 2022, 5:42pm UTC](https://discourse.cmake.org/t/installed-binary-distribution-for-linux-aarch64-but-cannot-execute-binaries/5037/8 "2022-02-17T17:42:30Z")

</div>

It would seem that our binaries assume some newer environment than is available in Ubuntu 14.04. Out of curiosity, what interpreter is `/usr/bin/ls` using?

---

<div class="post-metadata">

### Author: ![tomoreilly](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@tomoreilly](https://discourse.cmake.org/u/tomoreilly)
#### Post date: [February 17, 2022, 5:44pm UTC](https://discourse.cmake.org/t/installed-binary-distribution-for-linux-aarch64-but-cannot-execute-binaries/5037/9 "2022-02-17T17:44:11Z")

</div>

Sorry, I don’t understand the question about ‘interpreter’…

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [February 17, 2022, 5:44pm UTC](https://discourse.cmake.org/t/installed-binary-distribution-for-linux-aarch64-but-cannot-execute-binaries/5037/10 "2022-02-17T17:44:40Z")

</div>

Running `readelf -l /usr/bin/ls` will have say something about which interpreter is being requested.

---

<div class="post-metadata">

### Author: ![tomoreilly](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@tomoreilly](https://discourse.cmake.org/u/tomoreilly)
#### Post date: [February 17, 2022, 5:53pm UTC](https://discourse.cmake.org/t/installed-binary-distribution-for-linux-aarch64-but-cannot-execute-binaries/5037/11 "2022-02-17T17:53:33Z")

</div>

$

```auto
 readelf -l /bin/ls

Elf file type is EXEC (Executable file)
Entry point 0xba3d
There are 9 program headers, starting at offset 52

Program Headers:
  Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
  EXIDX 0x010b0c 0x00018b0c 0x00018b0c 0x00008 0x00008 R 0x4
  PHDR 0x000034 0x00008034 0x00008034 0x00120 0x00120 R E 0x4
  INTERP 0x000154 0x00008154 0x00008154 0x00019 0x00019 R 0x1
      [Requesting program interpreter: /lib/ld-linux-armhf.so.3]
  LOAD 0x000000 0x00008000 0x00008000 0x10b18 0x10b18 R E 0x8000
  LOAD 0x010ef4 0x00020ef4 0x00020ef4 0x0041c 0x010ac RW 0x8000
  DYNAMIC 0x010f00 0x00020f00 0x00020f00 0x00100 0x00100 RW 0x4
  NOTE 0x000170 0x00008170 0x00008170 0x00044 0x00044 R 0x4
  GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10
  GNU_RELRO 0x010ef4 0x00020ef4 0x00020ef4 0x0010c 0x0010c R 0x1

 Section to Segment mapping:
  Segment Sections...
   00 .ARM.exidx 
   01     
   02 .interp 
   03 .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .ARM.exidx .eh_frame 
   04 .init_array .fini_array .jcr .dynamic .got .data .bss 
   05 .dynamic 
   06 .note.ABI-tag .note.gnu.build-id 
   07     
   08 .init_array .fini_array .jcr .dynamic

```

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [February 17, 2022, 5:57pm UTC](https://discourse.cmake.org/t/installed-binary-distribution-for-linux-aarch64-but-cannot-execute-binaries/5037/12 "2022-02-17T17:57:16Z")

</div>

OK, so there’s a subtle difference between `armhf` and `aarch64`. [This blog post](https://linuxhint.com/about-arm64-armel-armhf/) covers the details (and more). It seems you have an `aarch64` kernel with `armhf` userspace. This will not work, so you’ll need to get an `aarch64` userspace somehow. It also looks like this predates Debian’s multiarch effort, so I don’t know if they are co-installable.

You can also just build CMake from source; this is probably the best option in this case.
