Updating cabal version on Fedora 25 - cabal

I have cabal already installed on my Fedora OS.
The current version of cabal is
user#localhost ~]$ cabal --version
cabal-install version 1.22.9.0
using version 1.22.5.0 of the Cabal library
I want to update cabal to the latest version Release 1.24.2.0. But the update is not successful.
user#localhost ~]$ sudo cabal update
[sudo] password for rajkumar:
Downloading the latest package list from hackage.haskell.org
Skipping download: Local and remote files match.
My ghc version is
user#localhost ~]$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.10.3
Below is the log of the 2 steps above.
I am seeing in log it says Installed cabal-install-1.24.0.2
Once it is done, still the cabal --version doesn't result in latest version. Any Idea
[user#localhost ~]$ sudo cabal update
[sudo] password for user:
Downloading the latest package list from hackage.haskell.org
[user#localhost ~]$ sudo cabal install cabal-install
Resolving dependencies...
Downloading Cabal-1.24.2.0...
Downloading base16-bytestring-0.1.1.6...
Configuring base16-bytestring-0.1.1.6...
Downloading cryptohash-sha256-0.11.100.1...
Downloading ed25519-0.0.5.0...
Configuring cryptohash-sha256-0.11.100.1...
Downloading tar-0.5.0.3...
Building base16-bytestring-0.1.1.6...
Building cryptohash-sha256-0.11.100.1...
Installed base16-bytestring-0.1.1.6
Configuring Cabal-1.24.2.0...
Configuring ed25519-0.0.5.0...
Installed cryptohash-sha256-0.11.100.1
Building Cabal-1.24.2.0...
Building ed25519-0.0.5.0...
Configuring tar-0.5.0.3...
Installed ed25519-0.0.5.0
Building tar-0.5.0.3...
Installed tar-0.5.0.3
Installed Cabal-1.24.2.0
Downloading hackage-security-0.5.2.2...
Configuring hackage-security-0.5.2.2...
Building hackage-security-0.5.2.2...
Installed hackage-security-0.5.2.2
Downloading cabal-install-1.24.0.2...
Configuring cabal-install-1.24.0.2...
Building cabal-install-1.24.0.2...
Installed cabal-install-1.24.0.2
[user#localhost ~]$ cabal --version
cabal-install version 1.22.9.0
using version 1.22.5.0 of the Cabal library
[user#localhost ~]$ sudo cabal --version
[sudo] password for user:
cabal-install version 1.22.9.0
using version 1.22.5.0 of the Cabal library
Thanks in advance for your kind suggestions.

According to:
https://github.com/haskell/cabal
Installing Cabal
Assuming that you have a pre-existing, older version of cabal-install, run:
cabal install cabal-install
To get the latest version of cabal-install. (You may want to cabal update first.)
cabal update
cabal install cabal-install
cabal update by itself will only get the current list of packages from Hackage.

Below steps update the cabal in ~/.cabal/bin but it does not update the symbolic link at /usr/bin
sudo cabal update
sudo cabal install cabal-install
So after that I followed the below steps as well and it helped me.
[user#localhost ~]$ which cabal
/usr/bin/cabal
[user#localhost ~]$ sudo rm -rf /usr/bin/cabal
[sudo] password for user:
[user#localhost ~]$ which cabal
~/.cabal/bin/cabal
[user#localhost ~]$ cabal --version
cabal-install version 1.24.0.2
compiled using version 1.24.2.0 of the Cabal library
[user#localhost ~]$ sudo ln -s ~/.cabal/bin/cabal /usr/bin
[sudo] password for user:
[user#localhost ~]$ which cabal
/usr/bin/cabal
[user#localhost ~]$ cabal --version
cabal-install version 1.24.0.2
compiled using version 1.24.2.0 of the Cabal library

Related

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.

Unable to locate package openssl-dev

I'm trying to install the ROOT CERN packages on linux, using Ubuntu 18.04, and whenever I get into the prerequisites download, with this command:
sudo apt-get install dpkg-dev cmake g++ gcc binutils libx11-dev libxpm-dev libxft-dev libxext-dev python openssl-dev
I get the following output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package openssl-dev
I've tried correcting this by configurating my repository as was suggested in this thread, yet the problem still persisted.
Would like to know how is it possible to fix this. Thank you.
Edit:
The complete output of the sudo apt update command is:
Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
I've also tried installing the libssl-dev package with sudo apt install libssl1.0-dev and the outcome remains unchanged.
openssl-dev is for RedHat and CentOS systems.
Install openssl and libssl-dev instead, which works on Ubuntu and Debian.
sudo apt-get install openssl libssl-dev
Type: sudo apt install libssl-dev
without the version number, that worked for me.
I am using Ubuntu 20.04.1 LTS.
May you can install it by using def command (if it's available!)
eg.: sudo dnf install openssl-devel

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

Upgrade Cabal on Ubuntu 14.04

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

Resources