Do not install xq, only yq

I’ve always been a fan of jq. If you don’t know what jq is, it is a nifty tool with it’s own DSL that allows major JSON transformation from the command line. Read on about it here: https://stedolan.github.io/jq/

There are other flavours such as yq and xq both for YAML and XML support.

I was asked to do something for a WordPress migration and it needed the use of xq but i had never used it before. I knew it existed and my first reflex was to try:

sudo apt install xq

To no avail because well it doesn’t exist as an apt package. So i went on and tried

pip3 install xq

Success, it works… Until you realize it is a very old version. I was struggling at using it because it has poor support that is until i messed up my install on another server and installed yq instead and realized that xq comes with it.

So, do not install the xq package from pypi.

Install install only yq from pypi and you can use xq and yq. Remember to install jq too or it won’t work.

PS: Don’t install jq from pypi, it seems to bug at least on my machines, just use the apt package instead.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.