Upgrade Cabal on Ubuntu 14.04 - cabal

When I install Haskell/GHC+cabal via sudo apt-get I installed cabal version 1.16. This is obviously not the most up to date version. How would I go about upgrade to at least version 1.18? I tried doing sudo apt-get update and sudo apt-get upgrade.
Edit:
Also when I run cabal install cabal-install it appears to "install" version 1.20 but when I run cabal -V it says cabal 1.16.0

Fixed it by adding the following line to my ~/.profile: export PATH=$(HOME)/.cabal/bin:$PATH

Related

How to install old versions of Xdebug

Actually, with the new release of Xdebug 3, I have to investigate more why its not working. I don't have much time for that.
The problem was I had this command for vagrant box creation but it does not have any version number.
sudo apt-get install -y php-xdebug
Is there a way to specify the version number to install version 2.9.3
this worked for me. Thank you #LazyOne for help. :-)
sudo apt-get install -y php-pear php7.3-dev
sudo apt install -y php7.3-xdebug
sudo pecl install xdebug-2.9.3

installing R 4.0.2 in ubuntu 18.04

I am trying to install R version 4.0.2 on ubuntu 18.04 but it shows this message:
The following packages have unmet dependencies:
r-base : Depends: r-base-core (>= 4.0.3-1.2004.0) but it is not going to be installed
Depends: r-recommended (= 4.0.3-1.2004.0) but it is not going to be installed
Recommends: r-base-html but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
You have to remove problematic PPA (it does no publish packages for 18.04 LTS - bionic) first with:
sudo add-apt-repository -r ppa:grass/grass-stable
and then update your package lists
sudo apt-get update
and install new updates with their dependencies by
sudo apt-get dist-upgrade
You have added R 3.5 repository (see bionic-cran35 in its URL), instead of needed R 4.0 (bionic-cran40). You have to remove wrong repository with
sudo add-apt-repository -r 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'
and then add correct one:
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/'
sudo apt-get dist-upgrade
sudo apt-get install r-base r-base-core r-recommended
In order to install the last R version in Ubuntu LTS >= 16.04. (amongst other 18.04) follow the instructions at CRAN. If you have already installed the distro version of R remove it with the package manager.
Here, I made a summarized version of the instructions.
Note that this instructions are valid for any LTS. I tried them with 18.04. and worked smoothly.
update indices
sudo apt update -qq
install two helper packages we need
sudo apt install --no-install-recommends software-properties-common dirmngr
Add the signing key (by Michael Rutter) for these repos
wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
Add the R 4.0 repo from CRAN
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
Install R and its dependences
sudo apt install --no-install-recommends r-base
Ready, you can execute R by just entering R on your terminal.

Package conflict while installing ms-sql in ubuntu. Broken packages

I am trying to install ms sql in Ubuntu 20.04. Even I have got it installed in 20.04 successfully following this guide but I sometime I have this problem multiple time and not sure why is this happening.
When I try to run following commads
curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
sudo apt-get install mssql-tools unixodbc-dev
I end up having below errors:
The following packages have unmet dependencies:
mssql-tools : Depends: msodbcsql17 (>= 17.3.0.0) but it is not going to be installed
unixodbc-dev : Depends: unixodbc (= 2.3.7)
Depends: odbcinst1debian2 (= 2.3.7) but 2.3.6-0.1build1 is to be inst
E: Unable to correct problems, you have held broken packages.
sudo apt-cache policy <package> shows multiple versions available for these packages.
I tried installing the right versions for dependencies that did not help when I ran sudo apt-get install mssql-tools unixodbc-dev again.
When I checked msprod.list file, it looks like 'https://packages.microsoft.com/config/ubuntu/18.04/prod' the tailed .list is missing so I added that(not sure I should do that or not). Then I have got everything installed.
Now when I do sudo apt update it ends up with below error:
E: The repository 'https://packages.microsoft.com/ubuntu/18.04/prod.list bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
I really don't understand what is happening and what I have to do to get thing working in simplest way.
Do as follow:
apt install mssql-tools unixodbc-dev odbcinst1debian2 msodbcsql17 unixodbc libodbc1
apt-get install stuff caring about package conflict.
If you use apt only it will forcefully install the package without taking care if the installation is creating conflicts.

How to install the latest version of octave in ubuntu 14.04

sudo apt-get build-dep octave is not working. The error message is "E: Build-Depends dependency for octave cannot be satisfied because the package automake cannot be found". I have modified the /etc/apt/sources.list file with deb replaced by deb-src. Even when I try sudo apt-get install octave, an error is displayed that the package is not located.
Octave packages http://wiki.octave.org/Octave_for_Debian_systems
Many Octave packages are also distributed by your Linux distribution. These are tested to work the best with your Octave version. For example:
sudo apt-get install octave-control octave-image octave-io octave-optim octave-signal octave-statistics
Octave's Personal Package Archive (PPA) for Ubuntu
sudo apt-add-repository ppa:octave/stable
sudo apt-get update
sudo apt-get install octave
Or
sudo apt-get autoclean
You can also Try with
wget ftp://ftp.gnu.org/gnu/octave/octave-4.0.0.tar.bz2
tar -xvf octave-4.0.0.tar.bz2
cd octave-4.0.0
./configure
make
sudo make install
More version are available at ftp://ftp.gnu.org/gnu/octave
Or
Adding a line to your /etc/apt/sources.list
amd64: http://packages.ubuntu.com/trusty/amd64/libgraphicsmagick3/filelist
i386: http://packages.ubuntu.com/trusty/i386/libgraphicsmagick3/download

Cabal installed 1.22 but using 1.16 by default how to change?

I there i'm trying to install the functionality Sandbox of cabal that comes only with cabal-1.18 .
I use the cabal install Cabal cabal-install and even went for cabal install Cabal cabal-install-1.22.2.0.
It says i'm using
> cabal install cabal
Resolving dependencies...
All the requested packages are already installed:
Cabal-1.22.2.0
Use --reinstall if you want to reinstall anyway.
Either way when i do:
> cabal --version
cabal-install version 1.16.0.2
using version 1.16.0 of the Cabal library
It says i'm using 1.16.0. How do I use the 1.22 that was installed?
Try cabal install cabal-install-1.22.0.0 --global

Resources