Clean Julia 1.0 install on Arch Linux -- Can't add packages

As a long-time R user, I’ve been intending to play with Julia for some time. Seeing the 1.0 release, I installed it on my Arch Linux machine but seem to be having an odd error, which Google isn’t helping me resolve.

My install is, as far as I can tell, clean. I have no .julia or related files, and no environment variables set relating to Julia that I can tell.

I type julia in a terminal and get the standard REPL prompt. I hit ‘]’ to enter the package manager, and type “add Gadfly” (or any other package name). I immediately get:

ERROR: no active project

and no other output.

Every guide and tutorial I can see leads me to believe that this should just work. I’ve found a couple of threads here that seem to have related problems, but they all seem to revolve around people who have edited environment variables or paths. I have tried typing activate, which gives no error or output, but that doesn’t change the situation.

I’m just a bit confused as to why this is happening on a clean install! I’d obviously appreciate solving it, but also any hints as to how either I or the Arch package maintainer might have caused this by mistake.

It looks like the default Arch install is not generating any of the user directories.

I’ve actually had a number of thoughts on this, and there’s been some discussion elsewhere. In the long run we’d like for there to be a “system Julia” much like there is a system Python and a system Java. This means we’d also like ther for there to be a .julia belonging to root.

Anyway, in the meantime, can you try creating $HOME/.julia? If that doesn’t work, try also creating a $HOME/.julia/environments. Failing that, if you do ]generate defaultenv this should create a directory for you called defaultenv which will contain the Project.toml and Manifest.toml that the Julia package manager can add projects to.

A little background: I’m a Manjaro user myself, but I’m pretty heavily involved with Julia and usually on the bleeding edge, so I haven’t bothered trying to use the pacman package yet. At the moment I’m still using binaries. That installation methodd should work just fine, if you want to go that route.

Thanks for the reply.

Running julia does create a $HOME/.julia, with a logs subdirectory for me automatically.

Running ]generate defaultenv also gives me the ERROR: no active project error, and doesn’t create a $HOME/.julia/environments directory.

If I manually create a $HOME/.julia/environments directory, then ]generate defaultenv still gives me an ERROR: no active project error!

I really don’t understand the environment setup, but other threads seem to mention something about the LOAD_PATH. In case it helps, my LOAD_PATH seems to be:

3-element Array{String,1}:

Hm, that’s quite strange, I don’t understand why it wouldn’t just create the directories it needs. When you install Julia by just copying the binaries, it just generates all these directories for you, I don’t understand why it would not do that from the arch image.

Out of curiosity, when you type ], what does the prompt say? For example, you should see

(v1.0) pkg>

Another thing you can try is doing ]activate . from some directory, it’s possible that once you do that it will generate a Project.toml and a Manifest.toml in that directory.

There might be something wrong with your setup. I just tried setting up Julia through the Arch repos on Arch linux in docker and it seems to work just fine.

Just as an update: I also tried copying the system /usr/share/julia/environments to my $HOME/.julia, and that didn’t work either.

When I type ] the prompt is just:


I tried activate, but it just gave no response and the same prompt.

After manually copying the system environments to my home directory, I then tried ]activate v1.0 which gave me the prompt that you showed, and let me install packages (although Gadfly errored out installing, but that’s something else to sort out!). When I exit julia and restart, though, I run into the same issue and have to manually ]activate v1.0.

It looks like julia just isn’t selecting or picking up a default environment.

This is very strange, then.

I just uninstalled and reinstalled julia via yay and am having the same problem.

Thanks for the help. I’ll keep digging. (I’ll be happy to try and other ideas you have, though!)

Had you done this from yay in the first place or pacman? I definitely would recommend pacman as Julia is supposedly maintained in the core Arch repo (and indeed, when I try it I get Julia 1.0.1 which is current).

Do those error dumps say anything more than just no active project?

Again, it seems that there is definitely something going on here that is specific to your install. Granted that Arch docker image that I tried this on is extremely minimal, but if Julia is able to install packages on that image it shouldn’t have any trouble on real Arch.

I installed from yay, although that’s just calling pacman.

I’m now trying it on another Arch Linux machine here to see what happens there. I’ll report back when that install finishes. (The machine needs a little bit of updating first.)

1 Like

I stand corrected. I just ran pacman -S julia and it’s started working – there must be something specific about yay that broke the PKGBUILD. I’ll report it to the maintainers.

Thanks for all your help!


For what it’s worth, I was running into the same issue (albeit on OSX), and I fixed it by touching ~/.julia/environments/v1.0/Project.toml and ~/.julia/environments/v1.0/Manifest.toml.


Why use a PKGBUILD when the binaries are part of the official repositories already?

This is just a confusion of terminology – I was installing via the core repository, so when there was a problem I assumed it might be with the original PKGBUILD used to build that package.

I’m having the same issue on CentOS 7 with julia 1.2. Julia was installed by downloading the tar.gz file and unpacking under /opt. I also have a symbolic link /opt/julia to the effective julia version dir. It’s installed and run as root user.

I tried the suggested solutions here but nothing seems to work… :frowning:

Any idea how to fix this?