Install GCC5 in Linux Mint LMDE 2 - linux

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.

Related

Build-Essential: Command Not Found on WSL

I am currently trying to setup my Windows 10 Dev Box with WSL. I have successfully install Ubuntu (Ubuntu 16.04.3) on a Windows 10 Insider Preview Version 1803 (OS Build 17666.1000). Using this walkthru to setup a RoR Dev ENV. Getting Rails app to...
sudo apt-get update seems to run fine.
sudo apt-get install git-core curl zlib1g-dev seems to run fine except libfreetype6 is no longer required.
When I try to run a build-essential command it gives me this message: build-essential: command not found
I try to apt-get autoremove to see if the libfreetype6 is causing the issue, no dice. I try sudo apt-get install --reinstall build-essential and it installs, but as soon as I run another build-essential command, it's not found again. Am I missing something?
Any help or direction would be awesome. Thanks.
You're missing nothing. build-essential is a package, not a command.
If you do apt show build-essential, you will notice this line:
Depends: libc6-dev | libc-dev, gcc (>= 4:7.2), g++ (>= 4:7.2), make, dpkg-dev (>= 1.17.11)
So it's just a convenient package that installs a set of essential build tools.
Furthermore, if you do dpkg -L build-essential, you will find that it contains nothing in /usr/bin (or whatever binary directory).
you have to install build-essential. first update repo list and update your libs, then install it.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
It works for me in WSL, thanks Roberto

Ubuntu 16.04 error with apt-get

Yesterday I updated Ubuntu from 14.04 to 16.04, when I tried to install git, I got this error:
The package linux-headers-4.4.0-65 needs to be reinstalled, but I
can't find an archive for it.
Then I tried to install another software, to the same error.
First you need to
sudo apt-get update
Then
sudo apt-get install git
I had a similar problem on Kali-Linux once. The thing that worked for me was:
sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get update && sudo apt-get dist-upgrade

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

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

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

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