0

[Update: Please follow the instuctions in the accepted answer. A PPA, snap or flatpack is not necessary if you install from the source code.]

Is there a PPA that has ugrep executables available for Ubuntu 18.04?

The Github repo only has links for Debian .deb files for various architectures, and I cannot install that on Ubuntu 18.04. The ugrep release available on packages.debian.org is v2.1 - quite old (current is 2.5) but for Ubuntu 18.04 this still seems to be too new:

sudo dpkg -i ugrep_2.1.1+dfsg-1_amd64.deb

(Reading database ... 912390 files and directories currently installed.) Preparing to unpack ugrep_2.1.1+dfsg-1_amd64.deb ... Unpacking ugrep (2.1.1+dfsg-1) over (2.1.1+dfsg-1) ... dpkg: dependency problems prevent configuration of ugrep: ugrep depends on libgcc-s1 (>= 3.0); however: Package libgcc-s1 is not installed. ugrep depends on libstdc++6 (>= 9); however: Version of libstdc++6:amd64 on system is 8.4.0-1ubuntu1~18.04.

dpkg: error processing package ugrep (--install): dependency problems - leaving unconfigured Processing triggers for man-db (2.8.3-2ubuntu0.1) ... Errors were encountered while processing: ugrep

ugrep tagline:

NEW ultra fast grep with interactive query UI: search file systems, source code, text, binary files, archives (cpio/tar/pax/zip), compressed files (gz/Z/bz2/lzma/xz/lz4), documents, fuzzy search, and more. A faster, user-friendly replacement for GNU/BSD grep. )

knb
  • 5,004
  • 1
    "The Github repo only has links for Debian .deb files for varius architectures, and I cannot install that on Ubuntu 18.04." why not? unless we have manual added extras debian package = ubuntu package. And you can use either the debian ppa or use dpkg to install – Rinzwind Aug 21 '20 at 12:25
  • 1
    oh and ... https://packages.ubuntu.com/source/groovy/ugrep – Rinzwind Aug 21 '20 at 12:27
  • 1
    @Rinzwind, OP talks about bionic ;-) And there it seems not available in universe. Even not in focal ... – pLumo Aug 21 '20 at 12:32
  • "The Github repo only has links for Debian .deb files for varius architectures, and I cannot install that on Ubuntu 18.04" Why not? Don't know how? Dependency problems? Error? Something else? – user535733 Aug 21 '20 at 12:33
  • @user535733 that is an assumption ;-) AU faq states to include relevant information ;-) plumo but it does in groovy and in theory one could install all the dependecies and then install ugrep. Not easy sure :) – Rinzwind Aug 21 '20 at 12:54

1 Answers1

2

Just go ahead and build it, it's not hard. I'll walk you through it.

  1. Go to https://github.com/Genivia/ugrep.
  2. Click on "Code" and download ugrep-master.zip.
  3. Open the download folder.
  4. Open ugrep-master.zip.
  5. Drag the ugrep-master folder out of the zip.
  6. Open the new ugrep-master folder in the terminal.
  7. Enter ./build.sh and let it finish.
  8. Enter sudo make install and let it finish.
  9. Type man ugrep to make sure it has installed properly.

That's it. It's straightforward and installs just fine on 18.04. See the following image:

ugrep version

See? It works just fine!

Note: You'll probably need to install 'build-essential', if you've not already done so. It's just the following command:

sudo apt-get install build-essential

Anyhow, there's no real need for a .deb with this one. It's really easy to compile and install. Just follow the above directions and everything should go fine.

KGIII
  • 3,968
  • 1
    Thank you. Running ./build.sh I get this error: /usr/bin/ld: cannot find -lboost_regex . - I had to sudo apt --fix-broken install; sudo apt install libboost-regex-dev , then the build.sh worked (even make test) – knb Aug 21 '20 at 14:53
  • 1
    Do you have a weird mix of 32 and 64 bit libraries? (Just for my curiosity sake.) And, I'm glad you got it sorted. As that is unlikely to happen to most people, I'll not add it to my answer - but your comment will help those that come behind us and use the answer AND then have your fix. – KGIII Aug 21 '20 at 15:00
  • 1
    Indeed, I have lots of libraries on my machine. The WINE software required from me to install a whole lot of 32- and 64 bit libraries. I think that the --fix-broken-install was necessary because of my previous attempt to install the Debian .deb file. – knb Aug 21 '20 at 15:03
  • 1
    Yup, that makes sense then. Ideally, it'll go smooth for most folks. In my case, it went off without a hitch - but I haven't any need for WINE and I didn't bother trying it with a .deb and thus only have 64 bit architectures installed. – KGIII Aug 21 '20 at 15:24