After some search, I realize that there is no simple enough algorithm how to install Asymptote in Ubuntu. (I need to update it - this is a suggestion from this forum).

Main Asymptote website allows to download a folder (which I did) with a bunch of files, which I have no idea what to do with. What I can do is:

  1. I can use Ubuntu Software repository. It doesn't have the latest Asymptote.
  2. I can type commands in the terminal. I haven't googled anything reasonable to type.

The most reasonable instructions I found are here. They are clear and I can manage them. However, they install Asymptote 2.41. I need the latest version though. I don't know how to explain terminal that I need specifically the newest version even though I have it downloaded at, say, Desktop/asymptote-2.62. enter image description here

In short: how to install the latest version of Asymptote (2.62 currently)?

Ubuntu 18.04, Gnome, TexStudio, texlive-full... what else should I provide to make technicalities clear.

UPDATE: These are my fruitless efforts to make sense of the Asymptote website manual. When it doesn't go as it is supposed to, I am lost. enter image description here

Here is config.log:

This file contains any messages produced by compilers while running
configure, to aid debugging if configure makes a mistake.

It was created by Asymptote configure 2.64, which was generated by GNU
Autoconf 2.69.  Invocation command line was

  $ ./configure --prefix=/home/sergey/.local/

## --------- ##
## Platform. ##
## --------- ##

hostname = sergey-Inspiron-3252 uname -m = x86_64 uname -r =
5.3.0-40-generic uname -s = Linux uname -v = #32~18.04.1-Ubuntu SMP Mon Feb 3 14:05:59 UTC 2020

/usr/bin/uname -p = unknown /bin/uname -X     = unknown

/bin/arch              = unknown /usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown /usr/bin/hostinfo      = unknown
/bin/machine           = unknown /usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/sbin PATH: /usr/local/bin PATH: /usr/sbin PATH:
/usr/bin PATH: /sbin PATH: /bin PATH: /usr/games PATH:
/usr/local/games PATH: /snap/bin

## ----------- ##
## Core tests. ##
## ----------- ##

configure:2567: checking for gcc configure:2597: result: no
configure:2660: checking for cc configure:2707: result: no
configure:2763: checking for cl.exe configure:2793: result: no
configure:2817: error: in `/home/sergey/asymptote-2.64':
configure:2819: error: no acceptable C compiler found in $PATH See
`config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CCC_set= ac_cv_env_CCC_value= ac_cv_env_CC_set=
ac_cv_env_CC_value= ac_cv_env_CFLAGS_set= ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set= ac_cv_env_CPPFLAGS_value= ac_cv_env_CPP_set=
ac_cv_env_CPP_value= ac_cv_env_CXXCPP_set= ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set= ac_cv_env_CXXFLAGS_value= ac_cv_env_CXX_set=
ac_cv_env_CXX_value= ac_cv_env_LDFLAGS_set= ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set= ac_cv_env_LIBS_value= ac_cv_env_YACC_set=
ac_cv_env_YACC_value= ac_cv_env_YFLAGS_set= ac_cv_env_YFLAGS_value=
ac_cv_env_build_alias_set= ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set= ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set= ac_cv_env_target_alias_value=

## ----------------- ##
## Output variables. ##
## ----------------- ##

CPPFLAGS='' CXX='' CXXCPP='' CXXFLAGS='-std=c++11' DEFS='' Datadir=''
PACKAGE_NAME='Asymptote' PACKAGE_STRING='Asymptote 2.64'
SET_MAKE='' SHELL='/bin/bash' TEXI2DVI='' VERSION='2.64' YACC=''
YFLAGS='' ac_ct_CC='' ac_ct_CXX='' ax_pthread_config=''
bindir='${exec_prefix}/bin' build='' build_alias='' build_cpu=''
build_os='' build_vendor='' contextdir='' datadir='${datarootdir}'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' dvidir='${docdir}'
exec_prefix='NONE' getopt='' host='' host_alias='' host_cpu=''
host_os='' host_vendor='' htmldir='${docdir}'
includedir='${prefix}/include' infodir='${datarootdir}/info'
kpsewhich='' latexdir='' libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec' localedir='${datarootdir}/locale'
localstatedir='${prefix}/var' mandir='${datarootdir}/man'
oldincludedir='/usr/include' pdfdir='${docdir}'
prefix='/home/sergey/.local' program_transform_name='s,x,x,'
psdir='${docdir}' sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com' sysconfdir='${prefix}/etc'

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "Asymptote"
#define PACKAGE_TARNAME "asymptote"
#define PACKAGE_VERSION "2.64"
#define PACKAGE_STRING "Asymptote 2.64"

UPDATE. The problem was in the lack of C compiler. For future generations: make sure you have it installed. This is how I did it and it worked:

Start by updating the packages list:

sudo apt update

Install the build-essential package by typing:

sudo apt install build-essential

The command installs a bunch of new packages including gcc, g++ and make.

You may also want to install the manual pages about using GNU/Linux for development:

sudo apt-get install manpages-dev

To validate that the GCC compiler is successfully installed, use the gcc --version command which prints the GCC version:

gcc --version

The default version of GCC available in the Ubuntu 18.04 repositories is 7.4.0:

gcc (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.0 Copyright (C) 2017 Free
Software Foundation, Inc. This is free software; see the source for
copying conditions.  There is NO warranty; not even for

Although! When I do the last step from the @oliversm response, this is what I get now after

make install

enter image description here

@oliversm, What is wrong now?

  • 1
    You need to install a C++ compiler (sudo apt install gcc) before you can install Asymptote from source.
    – Marijn
    Mar 5 '20 at 17:21
  • 1
    And install also cmake with sudo apt install cmake. Whenever Ubuntu says that a command is not found and it also tells you the command line that you can use to install it (as shown in your screenshot for cmake) then it is (almost) always a good idea to try what Ubuntu suggests.
    – Marijn
    Mar 5 '20 at 17:23
  • Have you tried installing the Ubuntu package from https://launchpad.net/ubuntu/+source/asymptote? It contains the current 2.62 version and is compiled for current Ubuntu distribution, this might work if it is a static binary, if not the versions of the libraries are not the same and it will break. Going from source is always more complicated because your Ubuntu is relatively old compare to the Asymptote version, that involves either updating the environment or cross-compiling in a newer a static binary for the older distribution.
    – Alexander
    Mar 6 '20 at 14:08
  • @Alexander, I tried to install Asymptote from its website. Their version is newer - 2.64 instead of 2.62 from your link. I have Ubuntu 18.04 LTS, I think it is new enough since I don't experiment with non LTS vertions - I don't find myself experienced enough Mar 10 '20 at 15:28

Compile from source

This was meant to be a comment to vonbrand's answer but ended up being too big.

The file doc/FAC/asy-faq.ascii (or a similar version I think) can be found at the github page, and I think related info on their FAQ page. Likewise they have a section on how to compile from source on Unix. Try and follow the instructions, but it is:

  1. Extract files to where-ever you want them (e.g. /home/user/). I got the files from SourceForge but those on Github are also fine.
  2. Open the terminal in /path/to/asymptote-2.62 (possible with a right click or cd asymptote-2.62/).
  3. Run ./configure --prefix=/home/user/.local/, but if you want this system wide then you might be able to change this to ./configure --prefix=/usr.
  4. make (or make all)
  5. make install

Steps 3-5 may take a few mins, (it took about 5 mins on my machine).

After doing this on my machine I can run ~/.local/bin/asy --version to see that the correct version (2.62) has been installed. If you want to ensure this is used and not an older system version (my system also had 2.44 under /usr/bin/) then a symbolic link using ln -s will do the trick, which would require sudo if you're overwriting an item under /usr. you should update your PATH. (e.g. export PATH=${HOME}/.local/bin:${PATH}, which can be added to your .bashrc file or similar).

  • 2
    It is a terrible idea to just rewrite what the distribution installed (next update will trample on your "fix"). Add ~/.local/bin at the front of your PATH in the startup file for your shell.
    – vonbrand
    Mar 4 '20 at 13:18
  • @vonbrand Good point, it is better to update path than overwrite /usr/bin/. I will update the answer to highlight this.
    – oliversm
    Mar 4 '20 at 13:25
  • Please see my update above. I know I am doing something stupid, but all the efforts are to no avail. Mar 5 '20 at 16:27
  • @SergeyBelyaev cf. The error messages, that ./configure can't find a C compiler. If you type in either cc, gcc, or clang, then hopefully one of these exists. They are all C compilers. Your system should almost definitely have come with one. If you can't find one in your PATH or don't have one installed, then you'll need to install one. Perhaps you can install gcc, but installing a C compiler without having a C compiler is a bit beyond me and its own question. Once you have a compiler, the rest will follow (hopefully).
    – oliversm
    Mar 5 '20 at 18:47
  • @oliversm , The problem was in the lack of C compiler. Thank you. Mar 6 '20 at 13:30

Grab the source from git or SourceForge, the file doc/FAQ/asy-faq.ascii contains detailed installation instructions.

If you need to integrate it into your system, I'd suggest you study how to create your own packages (no idea of Debian/Ubuntu, sorry), get the distribution's source package, unpack that and edit it for the new version and build.

  • Sorry. This is not helpful. I have downloaded the source from Sourceforge, like I said in the main post. doc/FAC folder doesn't contain the file that you have mentioned. I also search this file name all across the folder asymptote-2.62. To no avail. Feb 24 '20 at 10:40
  • 3
    @SergeyBelyaev see instructions on compiling from source at asymptote.sourceforge.io/doc/Compiling-from-UNIX-source.html.
    – Marijn
    Feb 28 '20 at 15:54
  • @SergeyBelyaev, sorry, it is FAQ, not FAC. Corrected.
    – vonbrand
    Mar 4 '20 at 13:14

As of this writing (Jan 2021), it's available on Ubuntu 20.04 and can be installed simply with sudo apt install asymptote.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.