I'm writing this after literally half a day of trying.

Ever since I installed Ubuntu (couple of weeks ago) and up until now, I've been using TeXstudio 2.6.6 for writing latex documents.
I didn't have to install anything for it to compile and generate basic mathematical LaTeX documents.

But, this morning I was trying to plot the graph of the equation x^2+y^2=5 on an x–y cartesian coordinate system (the circle with centre coordinates (0, 0) and radius 5), when I found out that I'm missing a package that could help me doing that: pgfplots.
This started an exhausting search that took almost 5 hours, while I was trying to understand how on earth to install this package.

So it all started with this document I found online, saying I need tlmgr in order to install new packages. This turns out later to have a partial support for my Ubuntu version (14.04), and required some more dependencies (at least I think that's what it was...) installation.

After doing that, I tried to install the package with:

 tlmgr install pgfplots

That failed for a reason that was revealed an hour later: tlmgr "needs to be initialized" with:

tlmgr init-usertree

After doing that, I tried again tlmgr install pgfplots, which raised an error, saying I need to install xzdec.
Again, having no idea what I'm installing, I ran:

sudo apt-get install xzdec

And when I thought my misery is finally over, I tried to install it again.
But that also raised some error (I don't remember what that was).
Looking again for an answer online, I found out this: http://www.tug.org/texlive/quickinstall.html So, I installed it too! It took a while, but it seemed promising at first, because it looked like it was doing some work, and downloading tons of packages to /usr/local/texlive/2014/texmf-dist/ (the package pgfplots being one of them).

When it was finished, it said there to add /usr/local/texlive/2014/texmf-dist/doc/info to my INFOPATH and /usr/local/texlive/2014/texmf-dist/doc/man to my MANPATH and "most importantly" it said to add /usr/local/texlive/2014/bin/x86_64-linux to my PATH, and so I did, but when I now open TeX Studio, it still says "\usepackage{pgfplots} Package not found" and "File pgfplots.sty not found." !

Please, if I'm getting something wrong help me understand what it is.

Let's start with:
If TeX Live (the thing that I installed) is, and I quote:

an easy way to get up and running with the TeX document production system. It provides a comprehensive TeX system with binaries for most flavors of Unix, including GNU/Linux, and also Windows.

and I just installed it this very moment, then how was I able to write LateX documents on TeX Studio up until now?

The second thing I'm confused about:
If TeX Live is now installed, and I know that I have the package pgfplots on my machine (I saw it when Tex Live was showing me the installation progress), then why is TeX Studio still complaining it can't find this package?

Any help regarding these two questions will be greatly appreciated.

And I don't mean to sound rude, but please, please, please, don't tell me "you need X and Y to be able to run Z on W to solve this problem", but rather give me specific instructions ("Open X, move file Y to Z, run W from terminal..."). And please, please, please, don't tell me "you can find the answer in this link to the (200 pages of) documentation" but rather link me to the specific page in it discussing this issue.

Thank you for reading, any help would be greatly appreciated.

  • There may have been some error at installation. Did you simply try to unstall it with TeX Live Package Manager, and re-installing it? Btw, it's not TeX Studio which complains (it's just an editor), but the compiler which does not find the package. – Bernard Dec 5 '14 at 1:24
  • Could you try compiling your document on the command line rather than in your editor? Please also explain how you added that directory to your PATH exactly. More in a second. – cfr Dec 5 '14 at 1:31
  • There are 2 ways to install TeX Live if you use GNU/Linux. One is to use the upstream installer (which you just did). The other is to install a packaged version from your distro. When you installed TeX Studio, apt will have seen that some texlive package was a dependency. So it will have installed it. But the packages will be in pieces so what you'll get is not a full install but parts of one. It would be best to decide which option you want to take and remove the other one from your system. (But don't go wildly deleting stuff yourself - that will make things worse.) – cfr Dec 5 '14 at 1:34
  • Would you prefer to use upstream's install (the one you just newly installed which is probably complete and can be managed and updated using tlmgr) or the packages from your distro (which you manage with apt and which is right now effectively a partial installation)? Your distro's will not be as current. If you use TiKZ/PGF, you may prefer the upstream one, which will get updates faster. Which you want to do determines what you should do next. – cfr Dec 5 '14 at 1:36
  • If you prefer to install upstream's version, you should read this question-answer which has very thorough instructions which explain what to do step-by-step, and links to some scripts which can automatise part of the process for you. – cfr Dec 5 '14 at 1:38

Browse other questions tagged or ask your own question.