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

**URL:** <https://discourse.julialang.org/t/clean-julia-1-0-install-on-arch-linux-cant-add-packages/16931>\
**Category:** New to Julia\
**Created:** [October 29, 2018, 7:16pm UTC](https://discourse.julialang.org/t/clean-julia-1-0-install-on-arch-linux-cant-add-packages/16931 "2018-10-29T19:16:15Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![tealeaf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tealeaf/32/5899_2.png) [@tealeaf](https://discourse.julialang.org/u/tealeaf)\
**Post date:** [October 29, 2018, 7:16pm UTC](https://discourse.julialang.org/t/clean-julia-1-0-install-on-arch-linux-cant-add-packages/16931/1 "2018-10-29T19:16:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Post date:** [October 29, 2018, 7:30pm UTC](https://discourse.julialang.org/t/clean-julia-1-0-install-on-arch-linux-cant-add-packages/16931/2 "2018-10-29T19:30:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tealeaf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tealeaf/32/5899_2.png) [@tealeaf](https://discourse.julialang.org/u/tealeaf)\
**Post date:** [October 29, 2018, 8:01pm UTC](https://discourse.julialang.org/t/clean-julia-1-0-install-on-arch-linux-cant-add-packages/16931/3 "2018-10-29T20:01:45Z")

</div>

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:

```julia
3-element Array{String,1}:
 "@"      
 "@v#.#"  
 "@stdlib"
```

---

<div class="post-metadata">

**Author:** ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Post date:** [October 29, 2018, 8:05pm UTC](https://discourse.julialang.org/t/clean-julia-1-0-install-on-arch-linux-cant-add-packages/16931/4 "2018-10-29T20:05:45Z")

</div>

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

```julia
(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.

---

<div class="post-metadata">

**Author:** ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Post date:** [October 29, 2018, 8:11pm UTC](https://discourse.julialang.org/t/clean-julia-1-0-install-on-arch-linux-cant-add-packages/16931/5 "2018-10-29T20:11:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tealeaf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tealeaf/32/5899_2.png) [@tealeaf](https://discourse.julialang.org/u/tealeaf)\
**Post date:** [October 29, 2018, 8:12pm UTC](https://discourse.julialang.org/t/clean-julia-1-0-install-on-arch-linux-cant-add-packages/16931/6 "2018-10-29T20:12:14Z")

</div>

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:

```julia
pkg> 

```

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.

---

<div class="post-metadata">

**Author:** ![tealeaf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tealeaf/32/5899_2.png) [@tealeaf](https://discourse.julialang.org/u/tealeaf)\
**Post date:** [October 29, 2018, 8:14pm UTC](https://discourse.julialang.org/t/clean-julia-1-0-install-on-arch-linux-cant-add-packages/16931/7 "2018-10-29T20:14:51Z")

</div>

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!)

---

<div class="post-metadata">

**Author:** ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Post date:** [October 29, 2018, 8:17pm UTC](https://discourse.julialang.org/t/clean-julia-1-0-install-on-arch-linux-cant-add-packages/16931/8 "2018-10-29T20:17:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tealeaf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tealeaf/32/5899_2.png) [@tealeaf](https://discourse.julialang.org/u/tealeaf)\
**Post date:** [October 29, 2018, 8:19pm UTC](https://discourse.julialang.org/t/clean-julia-1-0-install-on-arch-linux-cant-add-packages/16931/9 "2018-10-29T20:19:31Z")

</div>

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.)

---

<div class="post-metadata">

**Author:** ![tealeaf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tealeaf/32/5899_2.png) [@tealeaf](https://discourse.julialang.org/u/tealeaf)\
**Post date:** [October 29, 2018, 8:21pm UTC](https://discourse.julialang.org/t/clean-julia-1-0-install-on-arch-linux-cant-add-packages/16931/10 "2018-10-29T20:21:51Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![crbinz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/crbinz/32/1919_2.png) [@crbinz](https://discourse.julialang.org/u/crbinz)\
**Post date:** [October 30, 2018, 12:38am UTC](https://discourse.julialang.org/t/clean-julia-1-0-install-on-arch-linux-cant-add-packages/16931/11 "2018-10-30T00:38:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Post date:** [October 30, 2018, 10:07am UTC](https://discourse.julialang.org/t/clean-julia-1-0-install-on-arch-linux-cant-add-packages/16931/12 "2018-10-30T10:07:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tealeaf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tealeaf/32/5899_2.png) [@tealeaf](https://discourse.julialang.org/u/tealeaf)\
**Post date:** [October 30, 2018, 10:30am UTC](https://discourse.julialang.org/t/clean-julia-1-0-install-on-arch-linux-cant-add-packages/16931/13 "2018-10-30T10:30:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Steven\_Sagaert](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/steven_sagaert/32/29578_2.png) [@Steven\_Sagaert](https://discourse.julialang.org/u/Steven_Sagaert)\
**Post date:** [January 7, 2020, 10:16am UTC](https://discourse.julialang.org/t/clean-julia-1-0-install-on-arch-linux-cant-add-packages/16931/14 "2020-01-07T10:16:19Z")

</div>

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… ☹

Any idea how to fix this?
