# Linux 32bit cmake available?

**URL:** https://discourse.cmake.org/t/linux-32bit-cmake-available/1755
**Category:** Development
**Tags:** os:linux
**Created:** [August 27, 2020, 7:02pm UTC](https://discourse.cmake.org/t/linux-32bit-cmake-available/1755 "2020-08-27T19:02:47Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![bbrodd](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/35a633/32.png) [@bbrodd](https://discourse.cmake.org/u/bbrodd)
#### Post date: [August 27, 2020, 7:02pm UTC](https://discourse.cmake.org/t/linux-32bit-cmake-available/1755/1 "2020-08-27T19:02:47Z")

</div>

I am trying to install a 32bit version of cmake on my Xubuntu 18.04 32bit system using a script like this:  
#!/bin/bash  
version=3.18  
build=1  
mkdir ~/temp  
cd ~/temp  
wget [https://cmake.org/files/v$version/cmake-$version.$build-Linux-x86\_64.sh](https://cmake.org/files/v%24version/cmake-%24version.%24build-Linux-x86_64.sh)  
sudo mkdir /opt/cmake  
sudo sh cmake-$version.$build-Linux-x86\_64.sh --prefix=/opt/cmake

The binaries that get installed are 64bit binaries. How can I get 32bit binaries?

Thanks,  
Bob

---

<div class="post-metadata">

### Author: ![kyle.edwards](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/k/65b543/32.png) [@kyle.edwards](https://discourse.cmake.org/u/kyle.edwards)
#### Post date: [August 27, 2020, 7:35pm UTC](https://discourse.cmake.org/t/linux-32bit-cmake-available/1755/2 "2020-08-27T19:35:10Z")

</div>

As far as I know, [https://cmake.org/download/](https://cmake.org/download/) does not offer 32-bit Linux binaries. You have two options:

1. Build it yourself using the `bootstrap` script. All you need is a C and C++ compiler.
2. If you’re using Ubuntu, you can use the Ubuntu builds at [https://apt.kitware.com/](https://apt.kitware.com/).

---

<div class="post-metadata">

### Author: ![bbrodd](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/35a633/32.png) [@bbrodd](https://discourse.cmake.org/u/bbrodd)
#### Post date: [August 27, 2020, 7:46pm UTC](https://discourse.cmake.org/t/linux-32bit-cmake-available/1755/3 "2020-08-27T19:46:19Z")

</div>

I did try the bootstrap script method, but it complained about some things missing from my gcc compiler … I don’t typically compile code on linux, so I gave up on that since I didn’t really know what to do about it. Your second suggestion works like a charm! I now have cmake 32bit running on my Xubuntu 18.04 32bit system. I am going to update my process to get cmake installed in this manner going forward. Thanks so much.

---

<div class="post-metadata">

### Author: ![kyle.edwards](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/k/65b543/32.png) [@kyle.edwards](https://discourse.cmake.org/u/kyle.edwards)
#### Post date: [August 27, 2020, 8:59pm UTC](https://discourse.cmake.org/t/linux-32bit-cmake-available/1755/4 "2020-08-27T20:59:54Z")

</div>

Glad to hear the apt repository worked out.

As a matter of interest, what kind of error was the bootstrap script throwing? That is tested pretty thoroughly.

---

<div class="post-metadata">

### Author: ![bbrodd](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/35a633/32.png) [@bbrodd](https://discourse.cmake.org/u/bbrodd)
#### Post date: [August 27, 2020, 9:19pm UTC](https://discourse.cmake.org/t/linux-32bit-cmake-available/1755/5 "2020-08-27T21:19:01Z")

</div>

Cannot find a C++ compiler that supports both C++11 and the specified C++ flags. I initially performed apt install gcc. I get that error, so I took a guess and tried apt install gcc++, but that results in a many conflicts, so it fails to install. Like I said, I am new to compiling code on linux, so be kind 😉  
Bob
