0

My linking looks broken. It's showing below error.

$ opt
The program 'opt' is currently not installed. You can install it by typing:
apt-get install llvm

and apt-get install llvm-3.6 shows that:

$ apt-get install llvm-3.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
llvm-3.6 is already the newest version.

What am I missing here?

Edit

With opt, even llvm is also broken. Could anyone please clear that as well?

$ apt-cache policy llvm
llvm:
  Installed: (none)
  Candidate: 1:3.4-0ubuntu1
  Version table:
    1:3.4-0ubuntu1 0
    500 http://my.org.url/ubuntu/ trusty/universe amd64 Packages

which opt showing nothing.

S S
  • 211
  • 4
  • 9

1 Answers1

3

The binary (symbolic link) /usr/bin/opt is in the package llvm. Therefore install with

sudo apt-get install llvm

The installation of this package creates a symbolic link

/usr/bin/opt -> ../lib/llvm-3.6/bin/opt

Or create the link via

sudo ln -s /usr/lib/llvm-3.6/bin/opt /usr/bin/opt

You can check this via apt-file

sudo apt-get install apt-file
sudo apt-file update
apt-file search --regex /opt$

Sample output

glibc-source: /usr/src/glibc/debian/control.in/opt
llvm: /usr/bin/opt
llvm-3.4: /usr/lib/llvm-3.4/bin/opt
llvm-3.5: /usr/lib/llvm-3.5/bin/opt
llvm-3.6: /usr/lib/llvm-3.6/bin/opt
scsh-0.6: /usr/lib/scsh-0.6/opt
A.B.
  • 92,125