GeneralFail to install packages

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
asgrrr
Posts: 9
Joined: Wed Nov 06, 2019 2:36 am

Fail to install packages

Post by asgrrr »

I already asked about this in Page Layout, but this subforum might be more appropriate.

I try to install new packages and I always get an error message:


get host by name failed in tcp_connect()


Same thing whether manually in package manager or automatically in LaTeX.

I'm using Windows 7. More info in my original thread:

https://latex.org/forum/viewtopic.php?f ... 52#p110952

Why is this happening and how can it be solved?

Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10323
Joined: Mon Mar 10, 2008 9:44 pm

Fail to install packages

Post by Stefan Kottwitz »

Seems that MiKTeX cannot connect to the package repository. Check your package manager settings and choose a different repository.

Stefan
LaTeX.org admin
asgrrr
Posts: 9
Joined: Wed Nov 06, 2019 2:36 am

Fail to install packages

Post by asgrrr »

Thank you.

I get the same result when I try this.

get host by name failed in tcp_connect()

I selecte internet, left the proxy window empty. No repositories were loaded.

Any advice what settings I could use?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10323
Joined: Mon Mar 10, 2008 9:44 pm

Fail to install packages

Post by Stefan Kottwitz »

A proxy or a firewall could be an issue, especially if it's in a company and not at home.

You could try TeX Live. I used it since many years, after I changed from MiKTeX.

Stefan
LaTeX.org admin
asgrrr
Posts: 9
Joined: Wed Nov 06, 2019 2:36 am

Fail to install packages

Post by asgrrr »

Is there a way to download packages manually WITHOUT invoking any LaTeX software?
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Fail to install packages

Post by Johannes_B »

Yes, sure; but you would need to register the packages with the LaTeX software manually in order for them to be accessible.
I would suggest to use the package manager of your distribution.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
asgrrr
Posts: 9
Joined: Wed Nov 06, 2019 2:36 am

Fail to install packages

Post by asgrrr »

The package manager isn't working, that's why I ask.

How would I do it manually?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10323
Joined: Mon Mar 10, 2008 9:44 pm

Fail to install packages

Post by Stefan Kottwitz »

Some older install help that I wrote in 2010, that should still apply.

Download source: https://ctan.org or a mirror server.

Firstly, check README files, available documentation of the package, perhaps the beginning of the .dtx file when existing, to get installation information.

Installing a package available as dtx/ins bundle:
  • Download the content of the package directory. dtx is the extension of a documented source file, ins is the extension of an installation file. Put this in a temporary directory.
  • If there's nothing differently written in a README file run LaTeX (or TeX) on the .ins file. This is best done using the command prompt (latex packagename.ins), but you may use your TeX editor in LaTeX/DVI-LaTeX mode or what it is called there. This would usually produce one or more files ending with .sty, perhaps some additional files. As you now have cls or sty files or the like, the remaining steps are the same like in the next alternative way:
Installing sty or cls files:
  • Create a new directory with the package name in your local texmf directory structure (.../tex/latex/packagename)
  • Copy the package files (*.sty, *.cls etc.) into this directory.
  • Make the new package known to MiKTeX: refresh the MiKTeX filename database. To do this, click "Start/ Programs/ MiKTeX 2.x/ Maintenance/ Settings" (or similar) to get to the MiKTeX options, click the button "Refresh FNDB". The installation is complete.
  • If you did not download the documentation already, you could get it by running pdfLaTeX or LaTeX on the .dtx file. Compile twice to get correct references.

Obtaining and installing packaged universal archives:

Perhaps you could get a file with the extension .tds.zip. Such files are archives fitting to your TeX directory structure. Open it, check the content structure. You could extract it to the right place. Also here, as after any installation, refresh the MiKTeX filename database.

Installing a font package, especially for Type1 fonts, requires additonal steps.

Links with further information:

Integrating Local Additions on MiKTeX.org

What are documented LaTeX sources (.dtx files) in the UK TeX FAQ

Installing things on a (La)TeX system with detailed general instructions in the UK TeX FAQ

Downloading and Installing Packages by Nicola L. C. Talbot

The dtx format by Joseph Wright

Stefan
LaTeX.org admin
asgrrr
Posts: 9
Joined: Wed Nov 06, 2019 2:36 am

Fail to install packages

Post by asgrrr »

Thanks! I will look into this.
Post Reply