julia-build is a command-line utility that makes it easy to install virtually any version of Julia, from source.
It is available as a plugin for jlenv that
jlenv install command, or as a standalone program.
Manages gcc versions using
- Debian/Ubuntu package:
- RHEL/CentOS/Fedora package:
# As an jlenv plugin $ mkdir -p "$(jlenv root)"/plugins $ git clone https://github.com/jlenv/julia-build.git "$(jlenv root)"/plugins/julia-build # As a standalone program $ git clone https://github.com/jlenv/julia-build.git $ PREFIX=/usr/local ./julia-build/install.sh
# As an jlenv plugin $ cd "$(jlenv root)"/plugins/julia-build && git pull
# As an jlenv plugin $ jlenv install --list # lists all available versions of Julia $ jlenv install v0.6.0 # installs Julia v0.6.0 to ~/.jlenv/versions # As a standalone program $ julia-build --definitions # lists all available versions of Julia $ julia-build 0.6.0 ~/local/julia-v0.6.0 # installs Julia v0.6.0 to ~/local/julia-0.6.0
julia-build does not check for system dependencies before downloading and attempting to compile the Julia source. Please ensure that all required libraries are available on your system.
Custom Build Definitions
If you wish to develop and install a version of Julia that is not yet supported by julia-build, you may specify the path to a custom “build definition file” in place of a Julia version number.
Use the default build definitions as a template for your custom definitions.
Custom Build Configuration
The build process may be configured through the following environment variables:
||Where temporary files are stored.|
||Where sources are downloaded and built. (Default: a timestamped subdirectory of
||Where to cache downloaded package files. (Default:
||Custom mirror URL root.|
||Always download from official sources, not mirrors. (Default: unset)|
||Custom build definition directory. (Default:
||Additional paths to search for build definitions. (Colon-separated list)|
||Path to the C compiler.|
jlenv install and
julia-build support the
-p) flag to apply
a patch to the Julia source code before building. Patches are
# applying a single patch $ jlenv install --patch 1.0.3-p429 < /path/to/julia.patch # applying a patch from HTTP $ jlenv install --patch 1.0.3-p429 < <(curl -sSL http://git.io/julia.patch) # applying multiple patches $ cat fix1.patch fix2.patch | jlenv install --patch 1.0.3-p429
If you have the
sha256sum tool installed, julia-build will
automatically verify the SHA2 checksum of each downloaded package before
Checksums are optional and specified as anchors on the package URL in each definition. (All bundled definitions include checksums.)
Keeping the build directory after installation
jlenv install accept the
--keep flag, which
tells julia-build to keep the downloaded source after installation. This can be
useful if you need to use
memprof with Julia.
Source code will be kept in a parallel directory tree
--keep with the
jlenv install command. You should specify the
location of the source code with the
variable when using
Please see Julia-Build wiki for solutions to common problems.