# Error installing some packages

**URL:** https://discourse.julialang.org/t/error-installing-some-packages/73757
**Category:** New to Julia
**Tags:** package
**Created:** [December 29, 2021, 1:58pm UTC](https://discourse.julialang.org/t/error-installing-some-packages/73757 "2021-12-29T13:58:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![munizalex](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@munizalex](https://discourse.julialang.org/u/munizalex)
#### Post date: [December 29, 2021, 1:58pm UTC](https://discourse.julialang.org/t/error-installing-some-packages/73757/1 "2021-12-29T13:58:02Z")

</div>

Hi, I’m a ZorinOS user and installed julia 1.6.5 now. I was going to install some packages, like Latexify and LaTeXString and I had these errors:  
julia\> Pkg.add(“Latexify”)  
ERROR: UndefVarError: Pkg not defined  
Stacktrace:  
[1] top-level scope  
julia\> Pkg.add(“LaTeXString”)  
ERROR: UndefVarError: Pkg not defined  
Stacktrace:  
[1] top-level scope  
 ![2021-12-29_10-55](https://global.discourse-cdn.com/julialang/original/3X/0/e/0e61cc3f223b7a47440cbe6765237410c5ebf3f4.png)

What’s happening? There is so little information about Julia on the Internet that forces me to open a new topic here. Thanks for all the help

---

<div class="post-metadata">

### Author: ![MattWillFlood](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mattwillflood/32/20722_2.png) [@MattWillFlood](https://discourse.julialang.org/u/MattWillFlood)
#### Post date: [December 29, 2021, 2:16pm UTC](https://discourse.julialang.org/t/error-installing-some-packages/73757/2 "2021-12-29T14:16:39Z")

</div>

Hi @munizalex,

To install packages through Pkg in Julia, you must import `Pkg` first.  
Did you do that?

```julia
using Pkg
pkg.add("latexify")

```

Alternatively, you can switch to the Pkg REPL by typing `]`, as so:

```julia
        julia> ]
v(1.6.5) pkg> add Latexify

```

Hope this helps 🙂

---

<div class="post-metadata">

### Author: ![munizalex](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@munizalex](https://discourse.julialang.org/u/munizalex)
#### Post date: [December 29, 2021, 2:20pm UTC](https://discourse.julialang.org/t/error-installing-some-packages/73757/3 "2021-12-29T14:20:59Z")

</div>

OMG I can’t believe I was making a trivial mistake like that! Thanks @MattWillFlood Now I know

---

<div class="post-metadata">

### Author: ![munizalex](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@munizalex](https://discourse.julialang.org/u/munizalex)
#### Post date: [December 29, 2021, 2:29pm UTC](https://discourse.julialang.org/t/error-installing-some-packages/73757/4 "2021-12-29T14:29:52Z")

</div>

Now I had this error after trying to install Pkg.add(“LaTeXString”). It’s because it is already installed or something else? I ask this because I saw some dependencies packages being installed after using Pkg.add(“Latexify”) Edit2: Nope “LaTeXString” is not installed and I had these bunch of errors. Dummie. I know what I was wrong, it’s LaTeXStrings, not LaTeXString

 ![2021-12-29_11-27](https://global.discourse-cdn.com/julialang/original/3X/7/3/735d76bd9cfd5e957aff469dc24502fcc082880c.png)
