The recommended method is via xpm.

Overview

The xPack GNU realpath can be installed automatically, via xpm (the recommended method), or manually, by downloading and unpacking one of the portable archives.

Binaries are available only for GNU/Linux and macOS.

Easy install

The easiest way to install GNU realpath is by using the binary xPack, available as @xpack-dev-tools/realpath from the npmjs.com registry.

Prerequisites

The only requirement is a recent xpm, which is a portable Node.js command line application. To install it, follow the instructions from the xpm install page.

Install

With xpm available, installing the latest version of the package is quite easy:

cd my-project
xpm init # Only at first use.

xpm install @xpack-dev-tools/realpath@latest --verbose

This command will always install the latest available version, in the global xPacks store, which is a platform dependent folder (check the output of the xpm command for the actual folder used on your platform).

Uninstall

To remove the links from the current project:

cd my-project

xpm uninstall @xpack-dev-tools/realpath

To completely remove the package from the central xPacks store:

xpm uninstall --global @xpack-dev-tools/realpath --verbose

Test

To check if the xpm installed GNU realpath starts, use something like:

$ ~/Library/xPacks/@xpack-dev-tools/realpath/9.1.0-2.1/.content/bin/realpath --version
realpath (GNU coreutils) 9.1

Manual install

For all platforms, the xPack GNU realpath binaries are released as portable archives that can be installed in any location.

The archives can be downloaded from the GitHub releases page.

Download

The macOS versions of xPack GNU realpath are packed as .tar.gz archives. Download the latest version named like:

  • xpack-realpath-9.1.0-2-darwin-x64.tar.gz
  • xpack-realpath-9.1.0-2-darwin-arm64.tar.gz

Unpack

To manually install the xPack GNU realpath, unpack the archive and move it to ~/.local/xPacks/realpath/xpack-realpath-9.1.0-2:

mkdir -p ~/.local/xPacks/realpath
cd ~/.local/xPacks/realpath

tar xvf ~/Downloads/xpack-realpath-9.1.0-2-darwin-x64.tar.gz
chmod -R -w xpack-realpath-9.1.0-2

The result is a structure like:

$ tree -L 2 /Users/ilg/.local/xPacks/realpath/xpack-realpath-9.1.0-2
/Users/ilg/.local/xPacks/realpath/xpack-realpath-9.1.0-2/
├── README.md
├── bin
│   ├── greadlink
│   └── grealpath
└── distro-info
    ├── CHANGELOG.md
    ├── licenses
    ├── patches
    └── scripts

5 directories, 4 files

Test

To check if the manually installed GNU realpath starts, use something like:

$ ~/.local/xPacks/realpath/xpack-realpath-9.1.0-2/bin/realpath --version
realpath (GNU coreutils) 9.1

Easy install

The easiest way to install GNU realpath is by using the binary xPack, available as @xpack-dev-tools/realpath from the npmjs.com registry.

Prerequisites

The only requirement is a recent xpm, which is a portable Node.js command line application. To install it, follow the instructions from the xpm install page.

Install

With xpm available, installing the latest version of the package is quite easy:

cd my-project
xpm init # Only at first use.

xpm install @xpack-dev-tools/realpath@latest --verbose

This command will always install the latest available version, in the global xPacks store, which is a platform dependent folder (check the output of the xpm command for the actual folder used on your platform).

Uninstall

To remove the links from the current project:

cd my-project

xpm uninstall @xpack-dev-tools/realpath

To completely remove the package from the central xPacks store:

xpm uninstall --global @xpack-dev-tools/realpath --verbose

Test

To check if the xpm installed GNU realpath starts, use something like:

$ ~/.local/xPacks/@xpack-dev-tools/realpath/9.1.0-2.1/.content/bin/realpath --version
realpath (GNU coreutils) 9.1

Manual install

For all platforms, the xPack GNU realpath binaries are released as portable archives that can be installed in any location.

The archives can be downloaded from the GitHub releases page.

Download

The GNU/Linux versions of xPack GNU realpath are packed as .tar.gz archives. Download the latest version named like:

  • xpack-realpath-9.1.0-2-linux-x64.tar.gz

As the name implies, these are GNU/Linux tar.gz archives; they were build on Ubuntu, but can be executed on most recent GNU/Linux distributions.

Unpack

To manually install the xPack GNU realpath, unpack the archive and move it to ~/.local/xPacks/realpath/xpack-realpath-9.1.0-2:

mkdir -p ~/.local/xPacks/realpath
cd ~/.local/xPacks/realpath

tar xvf ~/Downloads/xpack-realpath-9.1.0-2-linux-x64.tar.gz
chmod -R -w xpack-realpath-9.1.0-2
$ tree -L 2 '/home/ilg/.local/xPacks/realpath/xpack-realpath-9.1.0-2'
/home/ilg/.local/xPacks/realpath/xpack-realpath-9.1.0-2/
├── README.md
├── bin
│   ├── greadlink
│   └── grealpath
└── distro-info
    ├── CHANGELOG.md
    ├── licenses
    ├── patches
    └── scripts

5 directories, 4 files

Test

To check if the manually installed GNU realpath starts, use something like:

$ ~/.local/xPacks/realpath/xpack-realpath-9.1.0-2/bin/realpath --version
realpath (GNU coreutils) 9.1