exa icon indicating copy to clipboard operation
exa copied to clipboard

exa is not in repositories of Ubuntu 20.04 (latest LTS)/WSL2

Open TorAmmQMediaPress opened this issue 3 years ago • 12 comments

https://askubuntu.com/questions/1290500/unable-to-locate-package-for-exa-on-wsl-2-ubuntu/1290552#1290552 this is pretty much all there is to know, including the fix

TorAmmQMediaPress avatar Jan 03 '21 11:01 TorAmmQMediaPress

Well, both the README and website say:

On Ubuntu 20.10 (Groovy Gorilla) and later, install the exa package.

The “fix” on StackOverflow is just a hack, and installing a package for a different version of Ubuntu can break in unexpected ways; people knowing how to deal with this can easily find the StackOverflow or compile exa themselves.

So I don’t think there’s anything to fix?

ariasuni avatar Jan 03 '21 20:01 ariasuni

If you simply must have exa on an ubuntu version earlier than 20.10, you can build from the source. As a non-root user, cd into a directory (Downloads is fine) and run

sudo apt install libgit2-dev rustc
sudo apt-mark auto rustc
git clone https://github.com/ogham/exa --depth=1
cd exa
cargo build --release && cargo test #cargo test is optional
sudo install target/release/exa /usr/local/bin/exa
cd ..
rm -rf exa
sudo apt purge --autoremove

This issue can probably be closed now

saltedcoffii avatar Jan 08 '21 07:01 saltedcoffii

Most ubuntu server actually use Ubuntu 20.04 (Focal Fossa) because 20.10 is not a LTS version,. Which make exa loving features not easy to access for many peoples. Installing exa by building it from source is not convenient at all. (don't even talk about keeping it up to date) So I'm wondering why exa can't actually be installed with APT on Ubuntu version prior than 20.10? Is a technical limitation? Is there anything we can do to help? Cheers 🙂

jimblue avatar Apr 01 '21 22:04 jimblue

@jimblue There's certainly no reason you, or anyone else, couldn't make a PPA for exa for Ubuntu 18.04 and 20.04

Another option is to set a weekly (or daily if you really want that) cron job to build exa from the source. Hope that helps :)

saltedcoffii avatar Apr 01 '21 22:04 saltedcoffii

I believe you can’t add a package to a repository of an already release Ubuntu version. According to a very quick web research, it seems relatively easy to create a PPA, since all the work to create a package has already been done.

ariasuni avatar Apr 01 '21 22:04 ariasuni

I encountered this issue also. I would of thought you would support the LTS version (20.4) as the top priority. If there is no compatibility issues with the published version in 20.1, a published package would be appreciated. For now, i will use an alternative to exa.

robole avatar May 18 '21 13:05 robole

Well, I make sure that Debian knew that there’s a new version of exa available, as you can see here.

Now, if I understand correctly, the package needs to be updated in Debian, then it will be updated in Ubuntu repositories (possibly not until next version of Ubuntu — I’m not sure what the policy is for this).

If you want to use exa, you can install exa manually or even download the source code and use debcargo to generate a .deb, but I don’t really have the time to investigate how a PPA work and you can use an alternative to exa if you prefer.

ariasuni avatar May 18 '21 13:05 ariasuni

hi @ariasuni

Thanks for the response. Thats no problem. I just wanted to let you know that someone else bumped into this. I too, dont want to spend too much time on configuration! I was looking at using a couple more command-line tools, but I need to be careful not to fall down the rabbit-hole tinkering! 😅

robole avatar May 18 '21 14:05 robole

v0.10.1 [+git] build for 20.04 - https://launchpad.net/~spvkgn/+archive/ubuntu/exa In Debian repos exa built with disabled git support.

spvkgn avatar Jul 12 '21 05:07 spvkgn

sudo apt install libgit2-dev rustc sudo apt-mark auto rustc git clone https://github.com/ogham/exa --depth=1 cd exa cargo build --release && cargo test #cargo test is optional sudo install target/release/exa /usr/local/bin/exa cd .. rm -rf exa sudo apt purge --autoremove

In Ubuntu 20.04.4 LTS, I had to install cargo as well.

So the commands had to be modified to

sudo apt install libgit2-dev rustc cargo
sudo apt-mark auto rustc cargo
git clone https://github.com/ogham/exa --depth=1
cd exa
cargo build --release && cargo test #cargo test is optional
sudo install target/release/exa /usr/local/bin/exa
cd ..
rm -rf exa
sudo apt purge --autoremove

nishad avatar Jul 18 '22 15:07 nishad

You could just extract the binary file from the tarball and put it in /usr/local/bin/. The man files (for exa) can go in /usr/local/share/man/man1/ and /usr/local/share/man/man5/. This is what I do for quite a few things that are not available or out of date on Debian/Ubuntu by putting them in a git repository and using GNU Stow to make symlinks in those locations. It's not a statically-linked binary in exa's case, but the libraries it uses seem to be common and I've never had a problem with it even with very old versions of Debian and CentOS.

eggbean avatar Jul 18 '22 18:07 eggbean

I just wanted a modern version of ls whether it was exa or lsd made no difference so I just used that since this was too much hassle.

1Mark avatar Dec 26 '22 17:12 1Mark