Currently, I'm trying to learn pure functional programming language, which is Haskell. I'm trying to install Haskell compiler, I have followed the instructions to install ghcup on my MacOS by following command:
curl https://get-ghcup.haskell.org -sSf | sh
But I couldn't install it, it prompted errors like these:
Following commands are required, but missing, please install: xz
"ghcup upgrade" failed!
Following commands are required, but missing, please install: xz
I hope somebody picks up this question and helps me get this out, thanks a lot.
xz [wiki] is a (de)compression tool. It is sometimes used to send data in a compressed form over a network.
You can install xz on a Mac OS X system with:
brew install xz
Given of course you first installed brew on your machine [brew.sh].
Related
I have followed the instructions to install ghcup on my MacOS by following command:
curl https://get-ghcup.haskell.org -sSf | sh
But I couldn't install it, it prompted errors like these:
Failed to install, consider updating this script via: ghcup upgrade
"ghcup --cache install" failed!
stack and ghcup are two different tools.
You can get stack from this website, which involves running the following command:
curl -sSL https://get.haskellstack.org/ | sh
On the other hand, ghcup is a tool that only installs the Haskell compiler (GHC), which means that you won't be able to build a project using Stack. Note that this last installation comes with a build tool called cabal. You can learn the differences between stack and cabal in this other question.
Regarding your error with ghcup, I'd try to use the instructions from https://gitlab.haskell.org/haskell/ghcup. It is the main repo from the project, and probably updated faster. Note that you can use the "simple bootstrap" process, and if that doesn't work, try the manual one.
If you have brew installed, you can use : brew install stack
I'm trying to make some Networkx Graphviz graphs.
After running: pos = nx.graphviz_layout(G, prog = 'sfdp'). An error occured, saying:
Error: remove_overlap: Graphviz not built with triangulation library
After some Google research I found that GTS is the problem. Bug report stated:
The Graphviz package is built --without-gts. This is bad news for sfdp, which complains “Error: remove_overlap: Graphviz not built with triangulation library” and fails to produce the beautiful output it creates when compiled --with-gts
Looking at comments ( on bug report ), someone said that the upstream sources for Graphviz are kept at link but I couldn't find new versions to download.
On package list I have the latest one (2.36 for trusty).
Anyone else having problems with sfdp?
Any help will be greatly appreciated!
For the ubuntu users, this is how I got grapvhiz to work on 16.04,compiling graphviz-2.40.1 from source:
In a first step , GTS needs to be installed , as graphviz looks for the gts.pc file.
Running
apt-file search gts.pc
Informs me I have to install 'libgts-dev' :
sudo apt install libgts-dev
next make pkg-config aware of the files:
pkg-config --libs gts
pkg-config --cflags gts
run configure to link in the gts library:
./configure --with-gts --prefix ~
make
make install
SFDP no longer throws the error 'Error: remove_overlap: Graphviz not built with triangulation library'
The command line codes for the pkg config I modified from this answer.
I know the question is for Ubuntu, but in case someone is having the same problem on macOS using homebrew the following worked for me:
brew reinstall graphviz --with-gts
I might have it working for Ubuntu 14.04, YMMV
Download the following graphviz packages directly from https://packages.debian.org/search?keywords=graphviz
graphviz_2.38.0-13_amd64.deb
libcgraph6_2.38.0-13_amd64.deb
libgvc6_2.38.0-13_amd64.deb
libgvpr2_2.38.0-13_amd64.deb
libltdl7_2.4.6-0.1_amd64.deb
python-pygraphviz_1.3.1-1_amd64.deb
I used version 2.38.0-13 from the stretch(testing) group.
You will need to remove the 32bit libltdl7 if present:
sudo apt-get remove libltdl7:i386
Install the packages directly with
sudo dpkg -i graphviz_2.38.0-13_amd64.deb
sudo dpkg -i libcgraph6_2.38.0-13_amd64.deb libgvc6_2.38.0-13_amd64.deb libgvpr2_2.38.0-13_amd64.deb libltdl7_2.4.6-0.1_amd64.deb
You can expect dependency errors. I cleared them with:
sudo apt-get install -f
And then re-install
sudo dpkg -i graphviz_2.38.0-13_amd64.deb
sudo dpkg -i python-pygraphviz_1.3.1-1_amd64.deb
The error no longer appeares though I would be hard pushed to say the graphs are any better.
Am looking for installing protobuf 2.5.0 on Arch Linux, so that protoc-2.5.0.so is installed on the OS, so that I can go ahead with building hadoop 2.6.0 from source and make my life easy! :)
BTW, protobuf 2.6.0 does not compile when hadoop is built from source I have tried that as well. Ubuntu 14.04 comes with protoc 2.5.0. I DO NOT want to use Ubuntu.
Please check the screenshot first (there is no protobuf 2.5.0), since the problem lies there.. I guess
am getting the following exception, I am aware that protoc is not installed in arch linux currently.
[ERROR] Failed to execute goal
org.apache.hadoop:hadoop-maven-plugins:2.6.0:protoc (compile-protoc)
on project hadoop-common:
org.apache.maven.plugin.MojoExecutionException: 'protoc --version' did
not return a version -> [Help 1]
Please help me out, since, I have spent 4 hours every day from two days, with no luck.
Compiling Google's protobuf is pretty easy.
I originally found out how to do it on this blog post while compiling hadoop myself.
But here is my version:
$ cd /usr/local/src/
$ wget https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz
$ tar xvf protobuf-2.5.0.tar.gz
$ cd protobuf-2.5.0
$ ./autogen.sh
$ ./configure --prefix=/usr
$ make
$ make install
$ protoc --version
Install protobuf for java
$ cd java
$ mvn install
$ mvn package
You should be good to go.
To enable you to install different versions of protobuf, install stow
then change ./configure --prefix=/usr to ./configure --prefix=/usr/local/stow/protobuf-2.5.0
Then link protobuf into your system with stow:
$ cd /usr/local/stow
$ stow protobuf-2.5.0
Note: stow uses /usr/local/bin by default. Make sure thats in your $PATH
To unlink that version of protobuf,
$ stow -D protobuf-2.5.0
Hope this helped.
I wonder why the above answer got downvoted,even I had to perform few more steps (in addition to the accepted answer by Rudker) to get protobuf 2.5 installed on Ubuntu Xenial.
Leaving the additional steps here for everyone's benefit:
apt-get install autoconf in response to the error : ./autogen.sh: autoreconf: not found for command : ./autogen.sh
apt-get install libtool in response to the error : autoreconf: libtoolize is needed because this package uses Libtool for command : ./autogen.sh
apt install g++ in response to the error : configure: error: C++ preprocessor "/lib/cpp" fails sanity check for command : ./configure --prefix=/usr
An easier but not future proof solution (for future queries) would be to head over to Arch Linux Archives: http://seblu.net/a/archive/packages/p/protobuf/
Uninstall the newer version of protobuf and install the downloaded package via pacman -U protobuf-2.5.x..
Though whenever you upgrade the Arch Linux packages via pacman you'd need to ensure you are doing: sudo pacman -Syu --ignore protobuf
I currently don't have enough reputation to comment, so I add a answer here to update the top voted answer.
Since protobuf move to different repo, the new wget command should be:
wget https://github.com/protocolbuffers/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz
And in order to run ./autogen.sh, you may need install these:
sudo yum install libtool automake autoconf
For OSX prerequisites, try SunitaKoppar's answer (I don't know why the down-votes).
Thanks for the steps. Just wanted to add that, to get autogen.sh to work, I had to install the below packages (commands for mac below):
brew install gtk
brew install autoconf
brew install automake
I have R 3.4.1.1 on my computer (Linux).
I want to install R version 2.14.1 since the package Rmosek does not work in newer version.
I have downloaded the R-2.14.2.tar.gz from Cran.
My problem is that I do not understand the INSTALL instructions,
It says to unpack the R sources and go to the top directory and issue the following commands:
./configure
make
I wrote the following in a terminal:
tar -zxvf R-2.14.2.tar.gz
cd Downloads
cd R-2.14.2
./configure
It is run but finally gives the error:
configure: error: --with-x=yes (default) and X11 headers/libs are not available
make
and it gives the error:
make: *** No targets specified and no makefile found. Stop.
The file explains that If my make is not called `make', set the environment variable MAKE to
its name, and use that name throughout these instructions. I really do not know how I should do it since I am new in Linux.
Is there any other instruction with more explanation? I would be very thankful in advance for your help or guidances.
Regards,
Shima.
This is answered in detail in the R installation and administration guide,
http://cran.r-project.org/doc/manuals/R-admin.html#Essential-programs-and-libraries
Unless you do not want to view graphs on-screen (or use a Mac) you
need ‘X11’ installed, including its headers and client libraries. For
recent Fedora distributions it means (at least) RPMs ‘libX11’,
‘libX11-devel’, ‘libXt’ and ‘libXt-devel’. On Debian we recommend the
meta-package ‘xorg-dev’. If you really do not want these you will need
to explicitly configure R without X11, using --with-x=no.
More specifically, for Ubuntu, this means:
sudo apt-get install xorg-dev
and then proceed with compiling and installing R.
If you have to compile R in your system and install you should have libx11-dev package installed in Ubunut.Can you check whether this package is installed or not.
Otherwise you can configure the source with this option as a work around solution only in the case if you are not going to use any GUI functionality in R.
./configure --with-x=no
You need to install these libraries:
sudo apt-get install -y libx11-dev \
xorg-dev \
libcurl4-openssl-dev
Then run:
./configure
make
And then it should work.
Good luck!
I downloaded the Haskell-platform source from here: http://www.haskell.org/platform/linux.html, installed ghc, and did /.configure. However when I do sudo make, I get the following error:
Preprocessing library HUnit-1.2.4.2...
Test/HUnit/Base.hs:1:1:
Could not find module `Prelude'
Perhaps you haven't installed the profiling libraries for package `base'?
Use -v to see a list of the files searched for.
Error:
Building the HUnit-1.2.4.2 package failed
make: *** [build.stamp] Error 2
Does anyone knows how to fix this?
I'm trying to install on Ubuntu 12.04.1 LTS
Instead of trying to install from the sources, simply install the Ubuntu packages, which will be much simpler, with:
$ sudo apt-get install haskell-platform
If you need a local version of the documentation and the profiling libraries, install the additional packages with:
$ sudo apt-get install haskell-platform-doc haskell-platform-prof
Daniel Fisher's comment led me to the solution. You have to install all the profiling libraries for each of the ghc packages you have installed.
Just write
sudo apt-get install ghc*-prof
That's how it worked for me