-1

I was on the Ubuntu Software Center and downloaded "C, C++ and Objective-C compiler(clang)." I didn't see it anywhere so i went to "search your computer and online resources" and didn't see it anywhere. I went to Ubuntu Software Center and went to the "installed" tab and searched for it. But it was not there (by the way it said that it was installed when I searched for it again except this as in the all software center in Ubuntu software center). This was weird and annoying so I went to terminal and entered open C, C++ and Objective-C compiler but it said that it couldn't get a file descriptor referring to the console. All helpful answers will be fully appreciated.

BTW my question is not a duplicate of "How can I know what programs some apt-get package contains?" as suggested by muru as one question is asking about how can they know what a package contains where my question is asking about where my download even is, obvious difference

RHF
  • 55
  • 1
    How exactly did you run the programs from terminal, and what exactly was the output on the terminal? Did you try gcc, c++, clang. If I try those I get fatal error because I did not provide them a file to compile. If they are not installed Ubuntu reports that they are not installed and suggests how to install them. – nobody Jul 03 '17 at 05:51
  • clang is the package name. Now use the other question see what files it provides. – muru Jul 03 '17 at 05:52
  • If not a dupe, can you [edit] to explain (a) your goal, and (b) what you know so far? Do you already know how to use Clang, such that you've tried the clang and clang++ commands but they're missing? If so, please let us know, and also type clang in a terminal without pressing Enter and press Tab twice (that'll show you what commands you have that start with clang, if any). *Or* if you don't know how to use Clang, then this is an XY problem and you should tell us about what you want to do/learn. – Eliah Kagan Jul 03 '17 at 06:16
  • your problem is that clang is not a "program" or something with a GUI you run or open. It is a compiler you use in the console clang file.c or from some IDEs to compile stuff – derHugo Jul 03 '17 at 11:14

2 Answers2

1

I think you are new to Linux. In Linux world things are different than Windows. On Windows you may double click a program to run it. But in Linux most of the programs are run from the terminal. Windows also have programs like this too.

For example, in Windows you may have a program in your current directory named gcc.exe and you can run it from cmd by typing gcc.exe. It's same in Linux too. You can run a program by typing just the program's name in the terminal.

For example you can run gcc in Linux by typing gcc in a terminal and hit Enter. It will throw you a error if you type open gcc because open is a command used for another purpose, not running programs.

And the "C, C++ and Objective-C compiler" line you saw in the Software Center was the DESCRIPTION of the package, not the programs name. "C, C++ and Objective-C compiler" actually installed the package clang and its dependencies.

You can run clang by typing clang in a terminal.

But first, I recommend you to browse articles about the differences between Windows and Linux before using Linux. If you don't you will be clueless about what's happening in your machine and you might break it.

RHF
  • 55
0

Maybe you didn't see clang anywhere in the Software Center because you haven't successfully installed it. Make sure that clang is installed by installing it from the terminal. If clang is already installed, nothing else will happen except a message will say that clang is already installed. Open the terminal and type:

sudo apt-get install clang

In Ubuntu 16.04 this command installs the default version of clang (clang-3.8). Clang 4.0 is in the default repositories of Ubuntu 17.04 and later. Try this example of compiling and running a hello world program in Ubuntu with clang.

After you have installed clang and run an example program, you may be interested in knowing where the clang executable is installed. For this run the command which clang. The results of which clang are:

/usr/bin/clang  
karel
  • 114,770