How do I install packages to TeXstudio?

How do I install packages to TeXstudio? I tried compiling a tex file and TeXstudio is not finding placeins.sty, sectsty.sty, etc.

Should I follow this manual installation guide, or is there a faster way? Should I use tlmgr?

This attempted solution didn't work:

$ tlmgr update --all
(running on Debian, switching to user mode!)
cannot setup TLPDB in /home/sony/texmf at /usr/bin/tlmgr line 5604.

I might have found the answer, but I encounter the same error:

$ tlmgr info placeins
(running on Debian, switching to user mode!)
cannot setup TLPDB in /home/sony/texmf at /usr/bin/tlmgr line 5604.

I am currently reading this answer in response. I am concerned by this output:

$ tlmgr init-usertree
(running on Debian, switching to user mode!)
tlmgr: action init-usertree returned a warning.

Why did it just say "there was a warning" without giving me more info? ...

Trying to find the first package I need to install to compile my paper, I encounter the following problem:

$ tlmgr info placeins
(running on Debian, switching to user mode!)
/usr/bin/tlmgr: Initialization failed (in setup_unix_one):
/usr/bin/tlmgr: could not find a usable xzdec.
/usr/bin/tlmgr: Please install xzdec and try again.
tlmgr: Couldn't set up the necessary programs.
Installation of packages is not supported.
Please report to [email protected].
tlmgr: Continuing anyway ...
Use of uninitialized value $r in split at /usr/bin/tlmgr line 3882.
tlmgr: Cannot find main repository, you have to tag one as main!

Should I merely ignore this xzdec problem? ... It seems as if the TeXstudio Ubuntu Software is incomplete, to be having so many issues; I think I installed 16.04 less than two weeks ago, and already installed all the updates when prompted.

It appears the answers to Martin Drozdik's similar question may solve my problem. However, these answers are three years old: Is the information still correct?

To be clear, my question is simply: How do I install packages for TeXstudio 2.10.8 in Ubuntu 16.04?


I think you should install only these packages:

  1. texstudio for TeXstudio 2.10.8
  2. texlive-latex-extra for placeins.sty and sectsty.sty

with

sudo apt-get install texstudio texlive-latex-extra

One can always find needed packages by using search on https://packages.ubuntu.com using Search the contents of packages section - see example for placeins.sty.