Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts
Saturday, August 18, 2018

Video: Windows Subsystem for Linux and Golang Environment with Visual Studio Code

Recently I have been playing with Golang and I found that there few packages that do not work with windows. So for that most of people are using VirtualBox and then installing Linux on that But Actually, you don’t need to do that as now you already have windows Linux subsystem which provides you a complete Linux Environment in your windows environment itself.

To educate, this I have created a video for the same. You can find that video below.



Here in this video, You can see that I have installed Ubuntu Linux subsystem.

What is Linux Subsystem:

Windows Linux Subsystem is a compatibility layer developed by Microsoft and Linux distributions for running Linux Environment natively on Windows 10. It was introduced with the Anniversary update.

From the following links, you can find more about it.
https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux
https://docs.microsoft.com/en-us/windows/wsl/install-win10

Links in Video:

Followings are links that have been used in the video.

How to download Visual Studio Code: https://code.visualstudio.com/
How to install Golang on Linux: https://www.digitalocean.com/community/tutorials/how-to-install-go-1-6-on-ubuntu-16-04
Golang Extension for Visual Studio Code: https://marketplace.visualstudio.com/items?itemName=ms-vscode.Go


Please Enjoy this video wanted to have more content like this. Please do subscribe to my youtube at   - https://www.youtube.com/user/DotNetjalps
Share:
Saturday, March 10, 2018

Solution: (Error)Unable to Correct problems, You have held broken packages–Install .NET Core on Ubuntu

Recently, I have been using Linux(Ubuntu) machine on my virtual box quite a bit and as  Microsoft.NET Developer I want to install .NET Core on Ubuntu. So I tried following the instruction from below link to install .NET core on Ubuntu 16.04.

https://docs.microsoft.com/en-us/dotnet/core/linux-prerequisites?tabs=netcore2x

But I was not unable to install .NET Core and I was getting following errors.

The following packages have unmet dependencies:
  dotnet-sdk-2.1.4 : Depends: dotnet-runtime-2.0.5 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
You can see the same error in the following screenshot.

error-ubuntu-net-core-214

I was a little bit curious about that and then I have read carefully the documentation mentioned on the above link and I have found that .NET Core require following require following Ubuntu distributions as Prerequisites.

  • libunwind8
  • liblttng-ust0
  • libcurl3
  • libssl1.0.0
  • libuuid1
  • libkrb5-3
  • zlib1g
  • libicu52 (for 14.X)
  • libicu55 (for 16.X)
  • libicu57 (for 17.X)

Most of the time it should be installed by default with sudo apt-get update and sudo apt-get upgrade command but sometimes it does not. So what I did install all these distributions one by one via sudo apt-get install command and in my case, I was not having liblttng-ust0 distribution on my machine. So I have installed it via the following command.

sudo apt-get install liblttng-ust0
You can also see below screenshot for the same.

install-ubuntu-distribution-for-netcore

Then I was able to install .NET Core on my machine via following above link on documentation.

install-netcore-ubuntu

And now it’s running .NET Core v 2.1.4 on my Ubuntu VirtualBox as you can see it in below dotnet version command.

net-core-version-command

I was able to solve my problem this and so I thought it will be a good idea to share it on my blog so it will help people who are having the same problem.

Stay tuned for more there is a lot more coming for asp.net core and node.js on Linux on future blog posts.
Share:

How to install Robo3T(Formerly RobMongo) on Ubuntu

Robo3T formerly known as RobMongo is one of best GUI tools for the managing and querying MongoDB database. I have been using it quite often for creating applications with MongoDB and Node.js. Recently a new version made available but there were no instructions for installing it on Ubuntu. So I thought it would be a great idea to write a blog post about it.

To install it. First, we need to open terminal and download tar.gz file from official site with the following command.
wget https://download.robomongo.org/1.2.1/linux/robo3t-1.2.1-linux-x86_64-3e50a65.tar.gz
robo3t-install-download-ubuntu

Once download will complete we need to extract tar.gz file with following command
tar -xvzf robo3t-1.2.1-linux-x86_64-3e50a65.tar.gz
extract-tar-file-robo3t-robmongo-ubuntu

As now we have extract it into the folder we need to move that under /usr/local/bin directory to make it available for all the users. So todo that we need to first create robo3t directly under /usr/local/bin folder with following command.
sudo mkdir /usr/local/bin/robo3t
mkdir-robo3t-robmongo-ubuntu

Then we need to move all the files of extracted folder into robo3t folder under /usr/local/bin directory with following command.
sudo mv  robo3t-1.2.1-linux-x86_64-3e50a65/* /usr/local/bin/robo3t
move-content-to-robo35-ubuntu

Now, We need to give permission to newly created directory with following command.
sudo chmod +x robo3t ./robo3t
permission-robo3t-robmongo-ubuntu

Once you are done with it. You are ready to use robo3t. You can run it from command line from usr/local/bin directory via following command.
./robo3t
run-robo35-command-line

And it will run the Robo3t like following.

robo3t-on-ubuntu

That’s it. Hope you like, Stay tuned for more!!.
Share:
Wednesday, March 7, 2018

How to install Visual Studio code on Ubuntu

Recently I presented a Webinar on ASP.NET Core on Linux. Here I have displayed how we can use Visual Studio Code a Free Open Source Editor from Microsoft to develop application. One of frequently ask question was How I can install Visual Studio Code on Linux. Since lots of People are using Ubuntu as Development Machine I thought it will be a good idea to write a blog post about how to install Visual Studio code on Linux(Ubuntu Machine).

So first thing we need to do it open a terminal in Ubuntu and then we need to type following command one by one.
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
Install-Visual-Studio-Code-Ubuntu

Then you need to run the following command to move gpg file download via Curl to etc/apt folder.
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
Install-Visual-Studio-Code-Ubuntu2-move-folder

Now, You need to run following command.
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
package-cache-insert-vscode-ubuntu-linux

After that, you need to run Apt-get Command to update package cache and Apt-get install command to install visual studio code.
sudo apt-get update
sudo apt-get install code
pakcage-install-visual-studio-code

That’s it. You are done with installing Visual Studio Code. You can find more information about different Linux flavors at following  link on Visual Studio code.

https://code.visualstudio.com/docs/setup/linux

Hope you like it. Stay tuned for more!!
Share:
Saturday, February 10, 2018

How to install node.js and npm on Debian 9

In this blog, We are going to see how we can install the node.js and npm on the Debian Operating system. So let’s get started.

First of all Either you should use “Sudo” command or use your root users to run all this command so that it will be available to all the users on this machine.

So first we need to install node.js so for that there are multiple ways but I am going to use node source binary distribution so that we can get latest stable version of node.

You can find node source binary distribution at - https://github.com/nodesource/distributions

First, You need to run the following command.
curl -sL https://deb.nodesource.com/setup_8.x | bash -
install-nodejs-debian

After that run the following command.
apt-get install -y nodejs
install-nodejs-debian2

Then you need to install NPM for that you need run the following command.
curl -L https://npmjs.org/install.sh | sudo sh
install-npm-debian

Then you can check node.js version with node -v like shown in below image.

node-version-debian

That’s it. Now create your favorite node.js application. Hope you Enjoyed it. Stay tuned for more!!
Share:
Search This Blog
About Me
My Photo

Full Stack Developer, Blogger, Microsoft Mvp, Mentor, Lifelong learner, 12+ Years of Experience for JavaScript, web and Microsoft technologies. ASP.NET MVC/Core, C#, Angular,Vue.js and node.js
Subscribe to my blog

  

My You tube channel- Please Subscribe
Youtube Video Playlist
My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews