Bat: Silent failure install on Pop 20.04 via apt

Created on 2 May 2020  Â·  2Comments  Â·  Source: sharkdp/bat

What version of bat are you using?

bat will not install: zsh: command not found: bat

Describe the bug you encountered:
bat appears to successfully install but does not install in reality.

➜  ~ sudo apt install bat
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libgit2-28 libhttp-parser2.9 libmbedcrypto3 libmbedtls12 libmbedx509-0 libssh2-1
The following NEW packages will be installed:
  bat libgit2-28 libhttp-parser2.9 libmbedcrypto3 libmbedtls12 libmbedx509-0 libssh2-1
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,349 kB of archives.
After this operation, 6,556 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libhttp-parser2.9 amd64 2.9.2-2 [21.8 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libmbedcrypto3 amd64 2.16.4-1ubuntu2 [150 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libmbedx509-0 amd64 2.16.4-1ubuntu2 [42.3 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libmbedtls12 amd64 2.16.4-1ubuntu2 [71.8 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libssh2-1 amd64 1.8.0-2.1build1 [75.4 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 libgit2-28 amd64 0.28.4+dfsg.1-2 [403 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 bat amd64 0.12.1-1build1 [1,585 kB]
Fetched 2,349 kB in 16s (150 kB/s)
Selecting previously unselected package libhttp-parser2.9:amd64.
(Reading database ... 207081 files and directories currently installed.)
Preparing to unpack .../0-libhttp-parser2.9_2.9.2-2_amd64.deb ...
Unpacking libhttp-parser2.9:amd64 (2.9.2-2) ...
Selecting previously unselected package libmbedcrypto3:amd64.
Preparing to unpack .../1-libmbedcrypto3_2.16.4-1ubuntu2_amd64.deb ...
Unpacking libmbedcrypto3:amd64 (2.16.4-1ubuntu2) ...
Selecting previously unselected package libmbedx509-0:amd64.
Preparing to unpack .../2-libmbedx509-0_2.16.4-1ubuntu2_amd64.deb ...
Unpacking libmbedx509-0:amd64 (2.16.4-1ubuntu2) ...
Selecting previously unselected package libmbedtls12:amd64.
Preparing to unpack .../3-libmbedtls12_2.16.4-1ubuntu2_amd64.deb ...
Unpacking libmbedtls12:amd64 (2.16.4-1ubuntu2) ...
Selecting previously unselected package libssh2-1:amd64.
Preparing to unpack .../4-libssh2-1_1.8.0-2.1build1_amd64.deb ...
Unpacking libssh2-1:amd64 (1.8.0-2.1build1) ...
Selecting previously unselected package libgit2-28:amd64.
Preparing to unpack .../5-libgit2-28_0.28.4+dfsg.1-2_amd64.deb ...
Unpacking libgit2-28:amd64 (0.28.4+dfsg.1-2) ...
Selecting previously unselected package bat.
Preparing to unpack .../6-bat_0.12.1-1build1_amd64.deb ...
Unpacking bat (0.12.1-1build1) ...
Setting up libmbedcrypto3:amd64 (2.16.4-1ubuntu2) ...
Setting up libssh2-1:amd64 (1.8.0-2.1build1) ...
Setting up libhttp-parser2.9:amd64 (2.9.2-2) ...
Setting up libmbedx509-0:amd64 (2.16.4-1ubuntu2) ...
Setting up libmbedtls12:amd64 (2.16.4-1ubuntu2) ...
Setting up libgit2-28:amd64 (0.28.4+dfsg.1-2) ...
Setting up bat (0.12.1-1build1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9) ...
➜  ~ which bat
bat not found

additionally, bat is not located in /usr/bin

Describe what you expected to happen?
bat to be installed. Interestingly the man entry for bat works properly.

How did you install bat?

sudo apt install bat

system
------

**$ uname -srm**
Linux 5.4.0-7626-generic x86_64  

**$ lsb_release -a**
No LSB modules are available.  
Distributor ID: Pop  
Description:    Pop!_OS 20.04 LTS  
Release:    20.04  
Codename:   focal  

bat
---

**$ bat --version**
./batIssueScript: line 127: bat: command not found  

**$ env**
PAGER=less  
./batIssueScript: line 47: bat: command not found

bat_config
----------
./batIssueScript: line 60: bat: command not found

bat_wrapper
-----------

No wrapper script.

bat_wrapper_function
--------------------

No wrapper function for 'bat'.

No wrapper function for 'cat'.

tool
----

**$ less --version**
less 551 (GNU regular expressions)  
bug

Most helpful comment

That was it! Thanks for your help. I'm just going to symlink batcat to bat so that I can continue to use the old command. It's too bad that the official repo had the name changed.

All 2 comments

I'm not sure which apt repository you're using, but the official Debian one had to rename the bat executable to batcat. Can you check that it's not installed as batcat?

That was it! Thanks for your help. I'm just going to symlink batcat to bat so that I can continue to use the old command. It's too bad that the official repo had the name changed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

antoinemadec picture antoinemadec  Â·  3Comments

x70b1 picture x70b1  Â·  3Comments

sharkdp picture sharkdp  Â·  3Comments

tbsvttr picture tbsvttr  Â·  3Comments

adamtabrams picture adamtabrams  Â·  3Comments