HOW TO get CodeLite 7.0 on Mint 17.1 / Ubuntu trusty 14.04

CodeLite installation/troubleshooting forum
devrich
CodeLite Curious
Posts: 1
Joined: Mon Apr 13, 2015 5:38 am
Genuine User: Yes
IDE Question: c++
Contact:

HOW TO get CodeLite 7.0 on Mint 17.1 / Ubuntu trusty 14.04

Post by devrich »

( disclaimer: I am explaining from my own experiences so proceed at your own risk but don't blame me if you run into a problem as I'm trying to help here :P )

Hi all!

I created this account on the forums for two reasons; the second is to ask all the annoying questions that experts take for granted to help me get into CodeLite as I have never used CodeLite before and love what I've read/heard about it.

But first i the primary reason why I created this account today:

HOW TO INSTALL CodeLite 7.0 on Ubuntu 14.04 (trusty) and also on Linux Mint 17.1 (based on ubuntu 14.04 trusty)

Please note that I am not posting this to offend anyone especially the developers of CodeLite in any way shape or form at all.

I am making this post to help others looking for a solution to why they can't get CodeLite 7.0 installed on Ubuntu 14.04 and Linux Mint 17.1 ( which has a bad reputation for CodeLite not installing on Linux Mint 17.1 right now if you search for "codelite" in Linux Mint 17.1's "Software Manager"!! )

This post I am making here is to help others "understand" why they are having trouble getting it installed and then hopefully help them in the future with other software in similar circumstances.



The Situation:

I figured out what me and some other people around the world had been doing wrong and I "have" successfully gotten CodeLite 7.0 installed on my Ubuntu 14.04 'trusty'-based Linux Mint 17.1 and I am going to tell everyone who has been searching in vein with google/etc for the solution... It all starts on this page here: http://codelite.org/LiteEditor/Repositories#toc1 "CodeLite apt repositories"

That page explains extremely well exactly what you need to do to install CodeLite 7.0 on Ubuntu/Mint.... That said, there is a problem that less experienced linux users face ( especially linux users trying to migrate "to" linux "from" windoze ).

On this page you are going to see the first thing you need to do:
sudo apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc
^-- that works so go ahead and do it


THE SECOND THING TO DO IS WHERE THE PROBLEM IS:
sudo apt-add-repository 'deb http://repos.codelite.org/ubuntu/ utopic universe'
^-- DON'T DO THIS!!

Here is the issue that happens if
you are not very experienced or familiar with installing new software yourself in linux/ubuntu/mint/etc:

Take another look at the tail-end of that line:
utopic universe'
^-- if you are using Ubuntu 14.10 or an upcoming version of linux mint 17.x that will be based on ubuntu 14.10 then that line is fine like it is.

However:

If you are like me and steadfast using Linux Mint 17.1 ( ubuntu 14.04 based ) __or__ if you are actually using Ubuntu 14.04 'trusty' then you're going to have a problem if you use that line to install CodeLite 7.0; either one of two things will happen:
(A) you use a synaptic updater or the Linux Mint 17.1 "Software Manager" and it shows "CodeLite 7.0" but then it just crashes or closes out without installing anything

(B) --or-- you use the command line ( like I do sometimes ) with "sudo apt-get install codelite wxcrafter" and then you get these error messages:
YOURUSERNAME@YOURPC ~ $ sudo apt-get install codelite wxcrafter
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested 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 information may help to resolve the situation:

The following packages have unmet dependencies:
codelite : Depends: libglib2.0-0 (>= 2.41.1) but 2.40.2-0ubuntu1 is to be installed
Depends: libhunspell-1.3-0 (>= 1.3.3) but 1.3.2-6ubuntu2 is to be installed
Depends: libstdc++6 (>= 4.9) but 4.8.2-19ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.
( ^-- NOTE that these 3 dependencies are not always the ones you'll see on your particular distribution or installation of linux -but- that doesn't matter because I am going to tell you how to fix it regardless of 'which' dependencies are missing/wrong!! )



Why does this happen?

The reason this problem happens is because we are _not-using_ "utpoic" ( 14.10 ); we are using "trusty" ( 14.04 ). To make it even more straight to the point; when the developers of CodeLite 7.0 compiled it; they compiled it against Ubuntu 14.10 which by default uses the newer versions of those dependencies ( libraries ) than what we have in 14.04 /Linux Mint 17.1 ---- This in turn causes the error messages we get and if you're like me then the first thing you do is go google searching for "How to install ..." the missing dependecy versions. Unfortionately this is much easier said than done plus the newer versions may or may not break your system.

Therefore the right way to install CodeLite 7.0 ( or any other software program that gives you the same trouble during installation ) is to simply replace the word "utopic" with "trusty" and you're all set.



The Solution:



-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
THE SOLUTION IS MUCH EASIER THAN YOU THINK AND WORKS FOR ALL SOFTWARE THAT GIVES YOU PROBLEMS LIKE THIS:
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Remember that 2nd line: form the installation page: http://codelite.org/LiteEditor/Repositories#toc1
sudo apt-add-repository 'deb http://repos.codelite.org/ubuntu/ utopic universe'
Just change the last tail-end words like this:

Code: Select all

sudo apt-add-repository 'deb http://repos.codelite.org/ubuntu/ trusty universe'
[/color]

And then continue on with the rest of the installation page and then all will be fine and work as intended!




To Summarize:

======================================================================================================
Here is the exact installation STEPS to follow in order to get software like CodeLite 7.0 to install on Linux Mint 17.1 / Ubuntu 14.04 (trusty):
======================================================================================================


( i am going to paraphrase the installation page here: )

STEP__1: If you have an older version of CodeLite installed , uninstall it first:

Code: Select all

sudo apt-get purge codelite codelite-plugins
[/color]


STEP__2: To download CodeLite for Debian based systems (Debian / Mint / Ubuntu etc):

Add CodeLite public key to avoid warnings from apt/aptitude:


Code: Select all

sudo apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc
[/color]

STEP__3: Now let apt know that the repositories exist: DON'T FORGET TO USE THE WORD 'trusty' LIKE I DID IN THIS NEXT LINE:

Code: Select all

sudo apt-add-repository 'deb http://repos.codelite.org/ubuntu/ trusty universe'
[/color]

STEP__4: You then need update your repositories:

Code: Select all

sudo apt-get update
[/color]

STEP__5: You should now be able to install CodeLite in the normal way:

Code: Select all

sudo apt-get install codelite wxcrafter
[/color]



Enjoy your CodeLite 7.0 on your Linux Mint 17.1 and/or on your Ubuntu 14.04 (trusty) :D
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: HOW TO get CodeLite 7.0 on Mint 17.1 / Ubuntu trusty 14.

Post by DavidGH »

Hi,

Welcome to the forum, and congratulations for upgrading to Linux :) .
THE SECOND THING TO DO IS WHERE THE PROBLEM IS:
sudo apt-add-repository 'deb http://repos.codelite.org/ubuntu/ utopic universe'
^-- DON'T DO THIS!!
It does indeed say that. However the preceding sentence starts:
"For example, if you use Ubuntu utopic (14.10)"
and the table after gives the various alternatives, including the correct line for trusty.

When starting something new, there's always a risk of making simple mistakes, and sometimes they can cause complicated problems. I know of no way to avoid this, except to go slowly and carefully.

Regards,

David
Post Reply