VS Code Installed using snap but its not showing - visual-studio-code

VS Code was installed in Kali Linux but I remove it using the following commands:
sudo apt-get purge code
sudo apt autoremove
as I need to install snap because it automatically updates software then I install snap using the following command:
sudo apt-get update
sudo apt-get install snapd
after all this I type the following commands to install vscode:
sudo snap install code --classic
but after all this. vs code isn't available in the applications menu and also can't detect using
code --version

Check if vs code is in the Snap installed list by running command
snap list
If it is in the list , try Running
snap run code

You download and install by manual
Download
wget https://az764295.vo.msecnd.net/stable/e5a624b788d92b8d34d1392e4c4d9789406efe8f/code_1.51.1-1605051630_amd64.deb
Give full permissin
chmod 777 code_1.51.1-1605051630_amd64.deb
Install
dpkg -i code_1.51.1-1605051630_amd64.deb
Done ✅

Related

legacy-install-failure error for sentence piece in jac

We recently had to reset our virtual environment, and thus had to reinstall jaseci_ai_kit via pip install jaseci_ai_kit. This commands runs fine for everyone in our group with a windows computer, but those of us with a mac receive a "legacy-install-failure" error for a package called sentencepiece. We were having trouble debugging this error ourselves (and sadly can't use any intent transitions until we do)
For linux you solve it by using this command
sudo apt update
sudo apt -y upgrade
sudo apt -y install --no-install-recommends git g++ build-essential pkg-config cmake

Installing last libreoffice by apt-get

How to install the last LibreOffice version by the apt-get command? I ran the followed commands at a Ubuntu 16.04 and just got version 6.2.8.2 but the last official one is 6.4.
sudo apt-add-repository ppa:libreoffice/ppa
sudo apt update
sudo apt upgrade
sudo apt install libreoffice
Second the official developers, LibreOffice-official-version Ubuntu 16.04 should be 5.1.6~rc2-0ubuntu1~xenial10. Because I had manually added sudo apt-add-repository ppa:libreoffice/ppa I was able to got libreoffice 6.2.8.2.
To achieve the 6.4 and newer installation they recommend to download the package or simple use sudo snap install libreoffice.

Cannot load VSCode

I cannot load VSCOde onto my old Toshiba laptop using Fedoa23. I follow the instructions from the web and finally get the message "No package code availale". I have previously installes VSCode on an old computer using Fedora23 but this time it does not work? Where do I go wrong?
Thanks.
Don't know, but this works for me.
You can use these step to install VSCode:
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
Then update the package cache and install the package using dnf (Fedora 22 and above):
dnf check-update
sudo dnf install code
Or on older versions using yum:
yum check-update
sudo yum install code

Remove grafana from ubuntu 17.10

I'm trying to un-install grafana 4.6.3 from Ubuntu 17.10, but is not possible. So far i have tried
sudo apt-get remove grafana , sudo apt-get remove --auto-remove grafana
and says Unable to locate package grafana.
Also tried to install it again from ubuntu software in order to unistall it properly but then pops me up an error message says: Unable to install grafana snap "graphana" is already installed. I installed it first time from ubuntu software.
What can i do to un-install it?
Have you tried dpkg?
sudo dpkg --remove --force-remove-reinstreq <packagename>
If apt won't remove it try using dpkg.
You could also try and clean up your apt utility.
sudo rm -rf /var/cache/apt/archives/<package_name.deb>
sudo apt-get autoclean
sudo apt-get update
sudo apt-get upgrade

How to upgrade Visual Studio Code editor?

What's the best way to upgrade Visual Studio Code on Linux Ubuntu?
For the time being I was periodically getting the newest version (.deb) from their official site: https://code.visualstudio.com/
sudo dpkg -i code_*.deb
Visual Studio Code enabled official Linux repositories on February 2017 (v1.10)
sudo add-apt-repository -y "deb https://packages.microsoft.com/repos/vscode stable main "
sudo apt update
sudo apt -y install code
You can upgrade / dist-upgrade as usual
sudo apt -y upgrade
sudo apt -y dist-upgrade
[1]: download the latest vscode (.deb) package to your computer on this
link :
https://go.microsoft.com/fwlink/?LinkID=760868
, or this there :
https://code.visualstudio.com/docs/
[2]: then open a terminal in the folder where you downloaded the .deb file and write:
sudo dpkg -i <the downloaded file>.deb
[3]: finally if you have apt-get do (if not install apt-get first):
sudo apt-get install -f
If you have installed it via the repository, exit VS Code then just do:
sudo apt update
sudo apt install code
This is the same command to install or upgrade to the latest version. You can see the version with:
code --version
Now the easiest and recommended way is to use snap:
sudo snap install --classic code
And updates are supposed to be automatic.
This works fine in ubuntu.
sudo apt-get update
sudo apt-get install code
When you install VSCode with the file .deb on Ubuntu 20.08, first, remove it:
sudo apt-get remove code
Add the repository in this link https://code.visualstudio.com/docs/setup/linux
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
Udate the package cache and reinstall
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install code
In the next time when you want to upgrade, just do:
sudo apt-get update
sudo apt-get upgrade code
Because your repository is missing information to upgrade VSCode, the above solution will fix it.
This is what I did to avoid the annoying message:
Remove vscode, if you already installed it.
sudo apt-get remove code
Add repositories, update and install:
sudo add-apt-repository -y "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main "
sudo apt update
sudo apt -y install code
If you have already installed VS code, go to the terminal and type two different commands:
sudo apt update
sudo apt-get upgrade code
The following commands work for me (for Linux) :
wget 'https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64' -O /tmp/code_latest_amd64.deb
sudo dpkg -i /tmp/code_latest_amd64.deb
Place those two commands into an executable Bash script called auto-update-VSCode, and you can simply run that from your shell any time Visual Studio Code says it's out of date.
I'm running Ubuntu 20.04 and this worked perfectly for me:
$ wget https://vscode-update.azurewebsites.net/latest/linux-deb-x64/stable -O /tmp/code_latest_amd64.deb
$ sudo dpkg -i /tmp/code_latest_amd64.deb
Best way to update Vscode in Ubuntu:
sudo apt-get update
sudo apt-get install code
sudo apt-get update
sudo apt-get install code