<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/56451>56451</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
llvm.sh not installing for Ubuntu 18.04.6 LTS
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
srikanth007m
</td>
</tr>
</table>
<pre>
Hello LLVM Developers,
I am trying to install llvm-14 on Ubuntu bionic and ended up with below issue. Please help on how to resolve all the dependencies and install llvm 14.
`sudo ./llvm.sh 14 all
+ CURRENT_LLVM_STABLE=14
+ needed_binaries=(lsb_release wget add-apt-repository)
+ missing_binaries=()
+ for binary in "${needed_binaries[@]}"
+ which lsb_release
+ for binary in "${needed_binaries[@]}"
+ which wget
+ for binary in "${needed_binaries[@]}"
+ which add-apt-repository
+ [[ 0 -gt 0 ]]
+ LLVM_VERSION=14
+ ALL=0
+ '[' 2 -ge 1 ']'
+ LLVM_VERSION=14
+ '[' 14 == all ']'
+ '[' 2 -ge 2 ']'
+ '[' all == all ']'
+ ALL=1
++ lsb_release -is
+ DISTRO=Ubuntu
++ lsb_release -sr
+ VERSION=18.04
+ DIST_VERSION=Ubuntu_18.04
+ [[ 0 -ne 0 ]]
+ declare -A LLVM_VERSION_PATTERNS
+ LLVM_VERSION_PATTERNS[9]=-9
+ LLVM_VERSION_PATTERNS[10]=-10
+ LLVM_VERSION_PATTERNS[11]=-11
+ LLVM_VERSION_PATTERNS[12]=-12
+ LLVM_VERSION_PATTERNS[13]=-13
+ LLVM_VERSION_PATTERNS[14]=-14
+ LLVM_VERSION_PATTERNS[15]=
+ '[' '!' _ ']'
+ LLVM_VERSION_STRING=-14
+ case "$DIST_VERSION" in
+ REPO_NAME='deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-14 main'
+ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key
+ apt-key add -
--2022-07-09 12:57:38-- https://apt.llvm.org/llvm-snapshot.gpg.key
Resolving apt.llvm.org (apt.llvm.org)... 151.101.122.49, 2a04:4e42:1d::561
Connecting to apt.llvm.org (apt.llvm.org)|151.101.122.49|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3145 (3.1K) [application/octet-stream]
Saving to: ‘STDOUT’
- 100%[====================================================================================================================================>] 3.07K --.-KB/s in 0s
2022-07-09 12:57:39 (21.3 MB/s) - written to stdout [3145/3145]
OK
+ add-apt-repository 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-14 main'
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-security InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Get:1 https://apt.llvm.org/bionic llvm-toolchain-bionic-14 InRelease [6,828 B]
Get:5 https://apt.llvm.org/bionic llvm-toolchain-bionic-14/main i386 Packages [1,835 B]
Get:6 https://apt.llvm.org/bionic llvm-toolchain-bionic-14/main amd64 Packages [10.6 kB]
Fetched 19.2 kB in 2s (10.5 kB/s)
Reading package lists... Done
+ apt-get update
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-security InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:1 https://apt.llvm.org/bionic llvm-toolchain-bionic-14 InRelease
Reading package lists... Done
+ PKG='clang-14 lldb-14 lld-14 clangd-14'
+ [[ 1 -eq 1 ]]
+ PKG='clang-14 lldb-14 lld-14 clangd-14 clang-tidy-14 clang-format-14 clang-tools-14 llvm-14-dev lld-14 lldb-14 llvm-14-tools libomp-14-dev libc++-14-dev libc++abi-14-dev libclang-common-14-dev libclang-14-dev libclang-cpp14-dev libunwind-14-dev'
+ apt-get install -y clang-14 lldb-14 lld-14 clangd-14 clang-tidy-14 clang-format-14 clang-tools-14 llvm-14-dev lld-14 lldb-14 llvm-14-tools libomp-14-dev libc++-14-dev libc++abi-14-dev libclang-common-14-dev libclang-14-dev libclang-cpp14-dev libunwind-14-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libunwind-14-dev is already the newest version (1:14.0.6~++20220622053131+f28c006a5895-1~exp1~20220622173215.157).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
clang-14 : Depends: libclang-cpp14 (>= 1:14.0.6~++20220622053019+f28c006a5895) but it is not going to be installed
Depends: libgcc-s1 (>= 3.0) but it is not installable
Depends: libllvm14 but it is not going to be installed
Depends: libstdc++6 (>= 11) but 8.4.0-1ubuntu1~18.04 is to be installed
Depends: llvm-14-linker-tools (= 1:14.0.6~++20220622053019+f28c006a5895-1~exp1~20220622173056.159) but it is not going to be installed
Depends: libclang1-14 (= 1:14.0.6~++20220622053019+f28c006a5895-1~exp1~20220622173056.159) but it is not going to be installed
clang-format-14 : Depends: libclang-cpp14 (>= 1:14.0.6~++20220622053019+f28c006a5895) but it is not going to be installed
Depends: libgcc-s1 (>= 3.0) but it is not installable
Depends: libllvm14 (= 1:14.0.6~++20220622053019+f28c006a5895-1~exp1~20220622173056.159) but it is not going to be installed
Depends: libstdc++6 (>= 11) but 8.4.0-1ubuntu1~18.04 is to be installed
clang-tidy-14 : Depends: libclang-cpp14 (>= 1:14.0.6~++20220622053019+f28c006a5895) but it is not going to be installed
Depends: libgcc-s1 (>= 3.0) but it is not installable
Depends: libllvm14 (= 1:14.0.6~++20220622053019+f28c006a5895-1~exp1~20220622173056.159) but it is not going to be installed
Depends: libstdc++6 (>= 11) but 8.4.0-1ubuntu1~18.04 is to be installed
clang-tools-14 : Depends: libclang-cpp14 (>= 1:14.0.6~++20220622053019+f28c006a5895) but it is not going to be installed
Depends: libclang1-14 (>= 1:13~++20200417041528+cc0ec3fdb9d-1~) but it is not going to be installed
Depends: libgcc-s1 (>= 3.0) but it is not installable
Depends: libllvm14 but it is not going to be installed
Depends: libstdc++6 (>= 11) but 8.4.0-1ubuntu1~18.04 is to be installed
clangd-14 : Depends: libclang-cpp14 (>= 1:14.0.6~++20220622053019+f28c006a5895) but it is not going to be installed
Depends: libgcc-s1 (>= 3.0) but it is not installable
Depends: libllvm14 but it is not going to be installed
Depends: libstdc++6 (>= 11) but 8.4.0-1ubuntu1~18.04 is to be installed
libc++-14-dev : Depends: libc++1-14 (= 1:14.0.6~++20220622053019+f28c006a5895-1~exp1~20220622173056.159) but it is not going to be installed
libc++abi-14-dev : Depends: libc++abi1-14 (= 1:14.0.6~++20220622053019+f28c006a5895-1~exp1~20220622173056.159) but it is not going to be installed
libclang-14-dev : Depends: libclang1-14 (= 1:14.0.6~++20220622053019+f28c006a5895-1~exp1~20220622173056.159) but it is not going to be installed
libclang-common-14-dev : Depends: lib32gcc-s1 (>= 3.0) but it is not installable
Depends: libgcc-s1 (>= 3.0) but it is not installable
Depends: libllvm14 (= 1:14.0.6~++20220622053019+f28c006a5895-1~exp1~20220622173056.159) but it is not going to be installed
libclang-cpp14-dev : Depends: libclang-cpp14 (= 1:14.0.6~++20220622053019+f28c006a5895-1~exp1~20220622173056.159) but it is not going to be installed
libomp-14-dev : Depends: libgcc-s1 (>= 3.0) but it is not installable
Depends: libllvm14 but it is not going to be installed
Depends: libstdc++6 (>= 11) but 8.4.0-1ubuntu1~18.04 is to be installed
lld-14 : Depends: libgcc-s1 (>= 3.0) but it is not installable
Depends: libllvm14 (= 1:14.0.6~++20220622053019+f28c006a5895-1~exp1~20220622173056.159) but it is not going to be installed
Depends: libstdc++6 (>= 11) but 8.4.0-1ubuntu1~18.04 is to be installed
lldb-14 : Depends: libclang-cpp14 (>= 1:14.0.6~++20220622053019+f28c006a5895) but it is not going to be installed
Depends: libgcc-s1 (>= 3.0) but it is not installable
Depends: liblldb-14 but it is not going to be installed
Depends: libllvm14 (= 1:14.0.6~++20220622053019+f28c006a5895-1~exp1~20220622173056.159) but it is not going to be installed
Depends: libstdc++6 (>= 11) but 8.4.0-1ubuntu1~18.04 is to be installed
Depends: python3-lldb-14 but it is not going to be installed
llvm-14-dev : Depends: libgcc-s1 (>= 3.0) but it is not installable
Depends: libllvm14 (= 1:14.0.6~++20220622053019+f28c006a5895-1~exp1~20220622173056.159) but it is not going to be installed
Depends: llvm-14 (= 1:14.0.6~++20220622053019+f28c006a5895-1~exp1~20220622173056.159) but it is not going to be installed
Depends: libclang-cpp14 (= 1:14.0.6~++20220622053019+f28c006a5895-1~exp1~20220622173056.159) but it is not going to be installed
llvm-14-tools : Depends: libgcc-s1 (>= 3.3) but it is not installable
Depends: libllvm14 but it is not going to be installed
Depends: libstdc++6 (>= 11) but 8.4.0-1ubuntu1~18.04 is to be installed
E: Unable to correct problems, you have held broken packages.`
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJztWltT6zgS_jXmRWWXfIvjBx4ICXMoOEBBzrxSsq3EWnwbS4bNv99u2U6ccDlhJpzJ7iwVcpFaX1_VasmKymR1-o1nWUmur3__Tqb8mWdlxWtpOOfEoFODnl0SlhNVr0SxJKokopCKZRnJsufctD1SFuRH1BSqIZEoCxETViSEFwlPSFORF6FSEgHmCxFSNtwidxlnkpOUZxWOTaEHUGsuy-yZE0RWKScJrxCjiAWXGnHIltie1crWvY-obJKSWIZzgf2WTIEEsbp-Z0LOf9zfz27mj6jm48P8bHI9M9yp7W0oCs5B6MdIFKwGrtBrOONMRo81b0V-WXJFWJKYrFJmzatSClXWK8MJNyA5aAmG2kHZIlmUNdHdK1CKGI5jOJ4RTHbZ-xPDo4Y_NYIp0qyHv6QiTslArgMjo5YHhnzDZmsKHOpPCCXmUsE7YsBr3a3d9fvs_uHy9mbHX2fX19BCB1BOgGhOQBxA48RuW6b4vg_gZjwEDzrOnep4fANll5XzMZFG-RCwVcZeN2DbMPZMITfE08uH-f0t0LcT7_1Bst4MGug8tqi3jTawSIv5uEO0cVPB33BTwuOM1cDxbMvAj3dn8_ns_ubhbftvuv1JiHju1Ax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