Cannot install julia packages - julia

I'm having issues installing packages in julia I've downloaded the most current julia release and I've run:
Pkg.init()
and then I try adding a package and it throws an error. I've deleted the /.julia directory to do a fresh install but nothing seems to be working. Any idea on what is going on?
julia> Pkg.add("Distributions")
INFO: Cloning cache of ArrayViews from git://github.com/JuliaLang/ArrayViews.jl.git
fatal: unable to access 'https://github.com//JuliaLang/ArrayViews.jl.git/': The requested URL returned error: 400
ERROR: unlink: no such file or directory (ENOENT)
in wait at task.jl:51
in sync_end at /Applications/Julia-0.3.6.app/Contents/Resources/julia/lib/julia/sys.dylib
in add at pkg/entry.jl:319
in add at pkg/entry.jl:71
in anonymous at pkg/dir.jl:28
in cd at /Applications/Julia-0.3.6.app/Contents/Resources/julia/lib/julia/sys.dylib
in __cd#228__ at /Applications/Julia-0.3.6.app/Contents/Resources/julia/lib/julia/sys.dylib
in add at pkg.jl:20
Version info:
julia> versioninfo()
Julia Version 0.3.6
Commit 0c24dca* (2015-02-17 22:12 UTC)
Platform Info:
System: Darwin (x86_64-apple-darwin13.4.0)
CPU: Intel(R) Core(TM) i7-4650U CPU # 1.70GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas
LIBM: libopenlibm
LLVM: libLLVM-3.3
git command:
> git config --get-regexp '^url.*'
url.https://github.com/.insteadof git://github.com
url.https://.insteadof git://

The issue is in your git configuration. You have two URL rewriting rules in place. The github-specific one is redundant and is missing the trailing backslash in its match rule. You can simply delete it:
git config --global --unset url.https://github.com/.insteadof

Might be a firewall issue, try running
git config --global url."https://".insteadOf git://
as described in the manual.

Related

BLAS setup in R on macOS

I am quite new to BLAS and Lapack setup. Executing
sessioninfo()
always returns
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
I was wondering how BLAS can be called? Because I see many forks' default matrix products have both BLAS and LAPACK.
Also, how Intel MKI can be called? I have installed it on my macOS, but still wonder how to use it.
Also, my R is 4.0.5 and macOS is macOS Big Sur 11.2.3
Please follow the below instructions, to build R with default BLAS, LAPACK using gnu compiler chain.
$ tar -xzvf R-4.0.5.tar.gz
$ cd R-4.0.5
$ ./configure
(or $./configure --with-readline=no --with-x=no if package readline and X11 is not installed)
$make
(not $ make install, so, we do not pollute system directory)
$ ldd bin/exec/R
(To make sure it will link libRblas.so although it may show that libRblas.so => not found)
For developers who have installed R, please locate the path of libRblas.so and
libRlapack.so (or libR.so), for example, $cd /usr/local/lib64/R
$ cd lib
$ mv libRblas.so libRblas.so.keep
$ln –s $(MKLROOT)/mkl/lib/intel64/libmkl_rt.so libRblas.so
The same way, you can replace the LAPACK libRlapack.so library too
($mv libRlapack.so libRlapack.so.keep
$ln –s $(MKLROOT)/mkl/lib/intel64/libmkl_rt.so libRlapack.so)
If you have prebuilt R with libR.so, replace it with
$(MKLROOT)/mkl/lib/intel64/libmkl_rt.so
Also you can go through the below links
https://software.intel.com/content/www/us/en/develop/articles/quick-linking-intel-mkl-blas-lapack-to-r.html
https://software.intel.com/content/www/us/en/develop/articles/using-intel-mkl-with-r.html

ERROR: LoadError: No deps.jl file could be found. Please try running Pkg.build("Arpack")

This the link of my first question from where get the following code
using DataFrames, IndexedTables, StatsPlots
df = DataFrame(a = 1:10, b = 10 .* rand(10), c = 10 .* rand(10))
#df df plot(:a, [:b :c], colour = [:red :blue])
In which while installing StatsPlots I got the following error Error building 'Arpack' which I ignore and then when I run above code I am getting the following error ERROR: LoadError: No deps.jl file could be found. Please try running Pkg.build("Arpack"). so use Pkg.build("Arpack") which gives me the following error
┌ Error: Error building `Arpack`:
│ ERROR: LoadError: LibraryProduct(nothing, ["libarpack"], :libarpack, "Prefix(/home/anil/.julia/packages/Arpack/zCmTA/deps/usr)") is not satisfied, cannot generate deps.jl!
Please help me to resolve this issue.
information about my system
julia> versioninfo()
Julia Version 1.0.4
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: Intel(R) Core(TM) i5-4210U CPU # 1.70GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, haswell)
As mentioned in the Arpack.jl README, you will have to compile arpack-ng binaries.
Here is the steps I followed on macOS 10.15.4 (should also work on Linux):
First download the v3.5.0 release of arpack-ng and extract to a folder.
Install autoconf, automake and libtool (here is an example using Anaconda, but you could also use Homebrew, MacPorts, or apt in Linux):
conda install autoconf automake libtool
Install the gfortran compiler.
Go to the folder where you extracted arpack-ng in step 1 and follow the build instructions:
sh bootstrap
./configure
make
make check
make install
Copy the compiled libs to your Julia packages folder:
sudo cp SRC/.libs/libarpack* ~/.julia/packages/Arpack/zCmTA/deps/usr/lib/
Run Pkg.build("Arpack") again.
Profit!

The problem of calling “MKL pardiso” in Julia

Background:
I have a large sparse matrix written by Julia that requires solutions, and I want to use MKL pardiso to improve speed.
I've found the pardiso.jl page and read README.
What I've done:
Install Pardiso in Julia:
using Pkg
Pkg.add("Pardiso")
Download MKL:
As I understand it, MKL pardiso is included in the MKL library.So I download from web.
After registering, I received an email with a download link. On the download page, I chose Intel math kernel library for windows.
Then I got the documents:w_mkl_2019.4.245.exe,I installed it completely on the computer.
Build Pardiso.jl:
Pkg. build ("Pardiso")
julia> using Pardiso
┌ Warning: No Pardiso library found when Pkg.build("Pardiso") ran, this package will not currently be usable. See the installation instructions and rerun Pkg.build("Pardiso").
└ # Pardiso C:\Users\huoze\.julia\packages\Pardiso\66TFF\src\Pardiso.jl:105
Question:
As mentioned above, I made a mistake in Julia. I think my MKL did not configure environment variables correctly, but I don't know how to do this step.
julia> versioninfo()
Julia Version 1.1.1
Commit 55e36cc308 (2019-05-16 04:10 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i5-3337U CPU # 1.80GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, ivybridge)
(Or do I have other mistakes that I haven't found?)
Please tell me how to do about this?

Julialang: error ` ERROR: LoadError: LoadError: Unable to open libLLVM!` when llvm is installed

I am still new to the Julia language, but ran into a strange error. So I am trying to precompile and load a package called Sympy.jl for symbolic mathematics like the eponymous Python package.
I have Julia 1.0.0 installed, and ran the code from the package manager:
build SpecialFunctions;
as this is a dependency for the Sympy package. I am getting an error that says:
ERROR: LoadError: LoadError: Unable to open libLLVM!
Now, I checked the julia versioninfo() command and it shows that LLVM is installed. Not sure why it says I am using red-hat linux when I am using Ubuntu. Here is the output.
Julia Version 1.0.0
Platform Info:
OS: Linux (x86_64-redhat-linux)
CPU: Intel(R) Core(TM) i7-6850K CPU # 3.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, broadwell)
Does anyone know how to fix this? I googled around about all references to similar issues have to do with earlier versions of Julia, so was not sure what applied anymore.
make sure you have libLLVM.so in your path. If not, and LLVM is installed, then create a simlink to the library:
on ubuntu:
$ ln -s /usr/lib/x86-64-linux-gnu/libLLVM.6.0.so.1 /usr/lib/x86-64-linux-gnu/libLLVM.so

Installing R on RHEL6

I am unable to install R in RHEL 6.
1)
rpm -ivh epel-release-6-8.noarch.rpm
"package epel-release-6-8.noarch.rpm" is already installed.
2) After running, sudo yum update
sudo yum install R
Loaded plugins: aliases, changelog, kabi, presto, product-id, refresh-packagekit, rhnplugin, search-disabled-repos, security, subscription-manager, tmprepo, verify,
: versionlock
This system is receiving updates from RHN Classic or RHN Satellite.
Loading support for Red Hat kernel ABI
Setting up Install Process
No package R available.
Error: Nothing to do
3) Based on various previous posts, I checked if rhel optional is enabled:
yum repolist all
Loaded plugins: aliases, changelog, kabi, presto, product-id, refresh-packagekit, rhnplugin, search-disabled-repos, security, subscription-manager, tmprepo, verify,
: versionlock
This system is receiving updates from RHN Classic or RHN Satellite.
Loading support for Red Hat kernel ABI
repo id repo name status
rhel-source Red Hat Enterprise Linux 6Server - x86_64 - Source disabled
rhel-source-beta Red Hat Enterprise Linux 6Server Beta - x86_64 - Source disabled
rhel-x86_64-server-6 Red Hat Enterprise Linux Server (v. 6 for 64-bit x86_64) enabled: 18,009
rhel-x86_64-server-extras-6 RHEL Server Extras (v. 6 for 64-bit x86_64) enabled: 51
rhel-x86_64-server-optional-6 RHEL Server Optional (v. 6 64-bit x86_64) enabled: 10,255
Adding one more piece of information - not sure if it is key.
As per the note below, a flag needs to be changed to 1.
https://bluehatrecord.wordpress.com/2014/10/13/installing-r-on-red-hat-enterprise-linux-6-5/
vim /etc/yum.repos.d/redhat.repo
[rhel-6-server-optional-rpms]
...
enabled = 1
However, the file is empty except for a few header statements. Not sure if it being empty is the cause.
Any step that I have missed?

Resources