On to Linux – part 2

Right, where were we?

The status of the quest to get a bare bones ASP.NET 5 (aka vNext) website running on a shared Linux hosting account:

  • We have a bare bones site running locally on my Windows development machine.
  • We have a dedicated Linux virtual server.
  • We have Mono installed so we can run the .Net framework on our Linux machine.
  • We started to install Libuv, multi-platform asynchronous IO library, so we can use the KestrelHttpServer (as per the instructions, I have no opinion on this yet).
  • We got stuck at the sudo make command, which resulted in sudo: make: command not found.

Since then, while life got in the way of this quest, I have received several offers of and with help. Absolutely awesome! Please keep it coming. If you can accompany any instructions with an explanation of why they would solve the problem at hand, that would be doubly awesome.

At this moment, sudo make needs to be made to work without complaint. The make part seems obvious: something is to be “made” which when dealing with software means source code needs to be compiled and/or linked into something a computer can execute.

But what the … is sudo?

The installation instructions for both Mono and Libuv consisted almost entirely of sudo commands. So I assumed it was something standard in Linux and didn’t think twice about it. The sudo make failing with command not found, leads me to think that sudo is some kind of framework or utility which can be extended with/by libraries to do more than “just” what is delivered out of the Ubuntu box. And that make is some utility that needs to be installed before sudo can actually put it to work.

Ah, Google tells me, my hunch wasn’t all that far off:

027-what-is-linux-sudo

And Google also helps in finding out how to get sudo to make stuff:

According to this question on the AskUbuntu StackExchange site, I just need to run

sudo apt-get install make

Now, what was that password again?
Darn. Forgot.
Double Darn. Thought I’d saved it to LastPass, but didn’t.
Ah well, onto Azure to reset it then…

028-Installing-Make

With that out of the way, let’s continue the installation of Libuv. The instructions included a change of current directory, so let’s do that. It’s a simple step to take and will probably avoid a whole slew of error messages. Then resume from the sudo make command that failed earlier.

Yay! Lift off. It’s compiling or whatever CC and CCLD mean.

029-make-libuv

Apparently, the sudo make install command installs the library file we just created somewhere on the Linux search path:

030-make-install

The sudo rm -rf /usr/local/src/libuv-1.4.2 && cd ~/ command will probably remove the source files and returns us to the original directory or the root – which just happens to be the same (not spending time today finding out what cd ~/ does). Yup. Certainly looks that way.

So, onto the last command sudo ldconfig. No idea what it does, probably some configuration. No stomach to find out. At the moment, if the instructions say to do something, I’m just doing it and keep my fingers crossed that everything is indeed going according to what the instruction writers had in mind.

Hang on, the writers did actually provide an explanation. Kudos to them!

031-make-explanation

Having installed both Mono and Libuv, DNVM is next. The instructions give a very long command and says that once that’s done, you should be able to use dnvm and get some help info. However, the output from the command seems to suggest having to type some other commands.

032-getting-dnvm

Lazy as I am, I just type dnvm and low and behold: we have succeeded in installing DNVM:

033-dnvm-response

That should be it!

[aside]
The instructions do talk about configuring NuGet to get additional package sources, but I am not going to bother. After all, we just have a bare bones website, so the default packages should be more than enough.
[/aside]

We are well on our way now. All we should have left to do is to deploy the site. More on that next time.


If you don’t want to miss anything: subscribe below and get every post delivered straight into your inbox.



2 comments on “On to Linux – part 2
  1. Hugo Logmans says:

    Read this:

    https://help.ubuntu.com/community/RootSudo

    You are going to need it later on. It also EXPLAINS why, how, advantages and disadvantages.

    PS: ~ points to the user home directory. e.g. /home/mvenema/

    • Marjan Venema says:

      Hey Hugo, thanks.
      Wow. Explanations. Yummie!
      Yeah, I had the “~” figured out by now. Love learning!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Show Buttons
Hide Buttons