update old node.js to new version doesn't work - node.js

My linux system used to install a old version node.js environment 0.8.14, now updated it to latest node.js through this
sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
when update is done and i rebooted the linux system, then I found it is still the old version node.js.

I'm willing to bet you installed the previous version through apt-get without first adding Chris Lea's PPA. The standard Ubuntu repositories have an old version of node.
You'll need to uninstall this old version before you can get the new one:
sudo apt-get --purge remove nodejs # Remove the package itself
sudo apt-get autoremove # Remove any unneeded dependencies
sudo apt-get update
sudo apt-get install nodejs

Related

How to install specific version of libhwloc5

I'm using Ubuntu 16.04 with an already installed libhwloc5 package of version 1.11.2. I want to install it with version 1.11.5 or above. I've tried to remove it and run
sudo apt-get update
then I run
sudo apt-get install libhwloc5
but it installs the same old version, how can I specify the version of installation?
You could specify the version of your package like this:
sudo apt-get install libhwloc5=<version-number-here>
Example: apt-get install virtualbox=5.0.18-dfsg-2build1

Unable to uninstall node from ubuntu 16.04 LTS

I tried these two commands to uninstall node js but I am not able to do it.
sudo apt-get purge nodejs
sudo apt-get autoremove
when I check for version, it shows
v9.3.0
And I want to install node 8.x
I got the same problem.
Step 1: Find the node location using
rails#rails-All-Series:~$ whereis node
node: /usr/local/bin/node
Step2: Remove node module from these the location.
rails#rails-All-Series:/usr/local/bin$sudo rm -rf node
Below mentioned link specifies how to delete node package from ubuntu
sudo apt-get purge nodejs
it will only be purging related nodejs packages
Other Alternative will be:
sudo apt-get purge --auto-remove nodejs
it will be implementing the below mentioned commands internally:
sudo apt-get purge nodejs
sudo apt-get autoremove
autoremove will actually be removing the related package and they were installed as a dependency module .

Install GCC5 in Linux Mint LMDE 2

I'm new in Linux and I would like to unistall gcc 4.9 which is installed in my distro Linux Mint LMDE 2 and install gcc 5. I tried to used the following command:
sudo apt-get install gcc5
but it didn't worked. Can someone please help me with this? Please provide all steps to follow. Thank you in advance
Try this.
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-5 g++-5
apt-get autoremove
This should work in Linux Mint if I'm not mistaken, as its still using the same respository.
sudo apt-get respository ppa:ubntu-toolchain-r/test
This will install you the correct respositories you need for the computer. Some packages are not automatically known to the computer so you need to install the respositories so the computer can install it.
sudo apt-get update
This will update your computer and all packages and the respoitory, this wil ensure it will now work
sudo apt-get install gcc-5 g++-5
This will install the gcc-5 version you wanted.
sudo apt-get autoremove
When you install certain stuff, some things are no longer needed. Maybe a required package from a previous version that you no longer need, do this to conserve space.

mysql-server:Depends: mysql-server-5.5 but it is not going to be installed

I am using ubuntu 14.04 on VirtualBox. I try install mysql-server using command
sudo apt-get install mysql-server, i always got error like below:
Some packages could be installed .This may mean that you have
request an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following packages have unmet dependencies:
mysqsl-server : Depends: mysql-server-5.5 but it is not going to be installed
E:Unable to correct problems, you have held broken packages.
and then i try use some command like below :
sudo apt-get update
sudo apt-get upgrade
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get purge mysql-server*
sudo apt-get install mysql-server
but it still error. Please help me!
Have you tried using
sudo apt-get install -f
This can repair broken packages or purge the installation.
If mysql-server is not installed with -f , you can try to install with normal way
sudo apt-get install mysql-server -y

Unable to update Git on Ubuntu

I am trying to set up Git on an Ubuntu Machine (I'm using a Samsung Chromebook running Ubuntu 12.04).
When I entered "sudo apt-get install git" and it successfully installed Git 1.79
user#ChrUbuntu:~$ git --version
git version 1.7.9.5
I can't figure out what I am doing wrong here. Any suggestions?
For new installations of Ubuntu I would first try this to get the latest updates
sudo apt-get dist-upgrade
For more info on this see https://askubuntu.com/questions/81585/what-is-dist-upgrade-and-why-does-it-upgrade-more-than-upgrade
That should solve it but if not, add the repository from these guys https://launchpad.net/~git-core/+archive/ppa
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git
This way you don't have to build it, etc.
Perhaps you need to build for
the newest version
wget git-core.googlecode.com/files/git-1.8.1.1.tar.gz
tar -zxf git-1.8.1.1.tar.gz
cd git-1.8.1.1
make prefix=/usr/local all
sudo make prefix=/usr/local install
If you are trying to upgrade to the latest version of Git, you should do:
sudo apt-get update
sudo apt-get upgrade
This will update all your packages, as well as Git.
BTW, latest version of Git on my Kubuntu 12.10 is 1.7.10.4.
A combination of some of the answers worked for me. I did...
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get upgrade
Have you tried to do an apt-get update?
You might have an outdated package list.
In ubuntu 14.04 I tried the terminal code:
sudo apt-get update
sudo apt-get upgrade
step to upgrade git.
1.) git --version
*to know what git version you had in your computer
2.) sudo apt-get update
*update ubuntu
3.) sudo apt-get upgrade
*to upgrade software including git
4.) try to git --version
that's it :)

Resources