72

I downloaded Postman for Linux (from https://www.getpostman.com/apps), unpacked .tar.gz file into ~/bin/postman and then tried to execute ~/bin/postman/Postman/Postman. Unfortunately it resulted with following error:

A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot find module 'glob'
    at Module._resolveFilename (module.js:455:15)
    at Function.Module._resolveFilename (/home/imilosavljevic/bin/postman/Postman/resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.Module._load (module.js:403:25)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/imilosavljevic/bin/postman/Postman/resources/app/node_modules/electron-json-storage/node_modules/rimraf/rimraf.js:7:12)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)

Is there any other way of installing/starting Postman on Ubuntu?

developer_hatch
  • 15,898
  • 3
  • 42
  • 75

13 Answers13

259

Yes, you can install Postman using these commands:

wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz
sudo tar -xzf postman.tar.gz -C /opt
rm postman.tar.gz
sudo ln -s /opt/Postman/Postman /usr/bin/postman

You can also get Postman to show up in the Unity Launcher:

cat > ~/.local/share/applications/postman.desktop <<EOL
[Desktop Entry]
Encoding=UTF-8
Name=Postman
Exec=postman
Icon=/opt/Postman/app/resources/app/assets/icon.png
Terminal=false
Type=Application
Categories=Development;
EOL

You don't need node.js or any other dependencies with a standard Ubuntu dev install.

See more at our blog post at https://blog.bluematador.com/posts/postman-how-to-install-on-ubuntu-1604/.

EDIT: Changed icon.png location. Latest versions of Postman changed their directory structure slightly.

ThatGuyRob
  • 126
  • 1
  • 12
Blue Matador
  • 2,706
  • 1
  • 8
  • 4
  • You can let Ubuntu do the work for you re adding it to the launcher. After the install you describe, just do the following. /usr/bin/postman When postman starts it'll appear in the launcher then, simply right click on its icon in the launcher and choose "Lock to Launcher". – Joe C Jun 09 '17 at 21:05
  • 4
    For me works just with a -f: `sudo ln -s /opt/Postman/Postman /usr/bin/postman -f` – Maykonn Oct 26 '17 at 18:03
  • Based on https://unix.stackexchange.com/a/8658/30962, it's better to install packages not managed by Aptitude under `/usr/local/bin` instead of `/usr/bin`. – Juampy NR Mar 05 '18 at 10:48
  • for the last postman icon can be found here (add an app after Postman dir): Icon=/opt/Postman/app/resources/app/assets/icon.png – taras May 24 '18 at 06:51
  • 3
    Works great on Ubuntu 18.04 after installing `libgconf` via `sudo apt-get install libgconf-2-4` – wSkc May 24 '18 at 17:37
  • 1
    I followed above steps, but I did not find postman on my Launcher. I started postman by typing command: 'postman' from terminal. I use Ubuntu 14.04 – anhduc.bkhn Jul 12 '18 at 03:57
  • Worked perfectly on Ubuntu 20.04 – Rohit Parte Nov 06 '20 at 14:53
26

Edit:

If you have snap or want to install it, just do:

$ sudo snap install postman

if you don't have it, install it as:

$ sudo apt update
$ sudo apt install snapd

Another way is create an script:

First create this script:

create a file install-postman.sh, inside of it add:

#!/bin/bash
cd /tmp || exit
echo "Downloading Postman ..."
wget -q https://dl.pstmn.io/download/latest/linux?arch=64 -O postman.tar.gz
tar -xzf postman.tar.gz
rm postman.tar.gz

echo "Installing to opt..."
if [ -d "/opt/Postman" ];then
    sudo rm -rf /opt/Postman
fi
sudo mv Postman /opt/Postman

echo "Creating symbolic link..."
if [ -L "/usr/bin/postman" ];then
    sudo rm -f /usr/bin/postman
fi
sudo ln -s /opt/Postman/Postman /usr/bin/postman

echo "Installation completed successfully."
echo "You can use Postman!"

run it in terminal with:

$ sh install-postman.sh

Then create the desktop launcher:

Postman.desktop

[Desktop Entry]
Encoding=UTF-8
Name=Postman
Exec=postman
Icon=/opt/Postman/resources/app/assets/icon.png
Terminal=false
Type=Application
Categories=Development;

Put this file in your desktop if you want (don't forget give to it execution permissions). Double click, and that's it!

Forever thanks to Aviskase (github acount name).

source -> https://gist.github.com/aviskase/e642248c35e400b56e2489430952369f#file-postman-desktop

developer_hatch
  • 15,898
  • 3
  • 42
  • 75
  • Thanks. Despite trying to install it "manually" by downloading and running the `ln` command and trying to generate the `.desktop` file entry, at the end the only way that worked for me was using the snap command (Ubuntu 16.04) – DarkCygnus Aug 20 '20 at 16:56
8
sudo snap install postman

This single command worked for me.

Paul Roub
  • 36,322
  • 27
  • 84
  • 93
SUNITHA K
  • 150
  • 1
  • 3
6

This is works for me on Ubuntu 18.04 with Postman v7.1.1 which is released on 20 May, 2019.

Download the latest version of Postman.

Most probably your downloaded file should be in Downloads folder.

# Postman-linux-x64-7.1.1.tar.gz is my downloaded file

cd /home/YOUR_USERNAME/Downloads/
tar -xzf Postman-linux-x64-7.1.1.tar.gz Postman/
sudo mv Postman /usr/share/postman
sudo ln -s /usr/share/postman/Postman /usr/bin/postman

If you get an error like this,

/usr/share/postman/Postman: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory

please install libgconf-2-4.

sudo apt install libgconf-2-4

Just type postman in your terminal and hit enter to run latest version of Postman. Now we have to create an Unity desktop file for your launcher. For create postman.desktop file run the below command.

sudo nano ~/.local/share/applications/postman.desktop

Then paste below lines into the postman.desktop file.

[Desktop Entry]
Encoding=UTF-8
Name=Postman
Exec=postman
Icon=/usr/share/postman/app/resources/app/assets/icon.png
Terminal=false
Type=Application
Categories=Development;

Now you can see the "Postman" icon in your Unity launcher. If you miss any point please go through this video or comment below.

Postman 7.1.1

Kushan Gunasekera
  • 7,268
  • 6
  • 44
  • 58
4

Don't forget to add sudo otherwise you will get postman.tar.gz: Permission denied error. And unlink postman if you get error like failed to create symbolic link /usr/bin/postman: File exists. So below is the full code:

sudo wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz
sudo tar -xzf postman.tar.gz -C /opt
sudo rm postman.tar.gz

sudo unlink /usr/bin/postman
sudo ln -s /opt/Postman/Postman /usr/bin/postman

Then just run postman in the terminal.

Nayan
  • 1,521
  • 2
  • 13
  • 27
Deepti Gehlot
  • 617
  • 7
  • 8
3

Yes, there is awesome simple bash script I found, which allows you to update the Postman Linux app, straight from the terminal, called postman-updater-linux.

Just install it using NPM:

npm install -g postman-updater-linux

Then check for updates:

sudo postman-updater check

Then install:

sudo postman-updater install

Or update:

sudo postman-updater update

All three last commands can be used with custom location by adding -l /your/custom/path to end of this command.

2

open terminal and type command

sudo snap install postman

hit enter button if it asks for password enter and proceed it will install postman

If above solution doesn't work for you then you should install snap first to install it

sudo apt update
sudo apt install snapd

when snap is installed successfully then u can use its packages and follow my solution for postman

Shahbaz
  • 3,433
  • 1
  • 26
  • 43
1

don't forget to

chmod ~/.local/share/applications/postman.desktop +x

otherwise it won't show in the Unity Launcher

1

To do the same I did following in terminal-

$ wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz
$ sudo tar -xzf postman.tar.gz -C /opt
$ rm postman.tar.gz
$ sudo ln -s /opt/Postman/Postman /usr/bin/postman
  1. Now open file system, move to /usr/bin/ and search form "Postman"
  2. There was a sh file with name 'Postman'
  3. Double clicked on it which opened postman.
  4. Locked icon to launcher on right clicking its icon for further use.

Hope will hell others too.

S.Yadav
  • 4,273
  • 3
  • 37
  • 44
1

Was having an issue getting the "Run in Postman" links to work with the browsers until I added this to the .desktop file

MimeType=application/postman;x-scheme-handler/postman;
Numant Santz
  • 170
  • 1
  • 11
0

As postman chrome app has deprecated so, Postman Native app is available to support native plateforms. You can install Postman on Linux/Ubuntu via the Snap store using the command in terminal.

$ snap install postman

After successful installation you can find this in your applications list.

Fatal Exception
  • 167
  • 2
  • 12
0

Download latest version of postman from https://www.postman.com/downloads/ then after tar.gz file gets downloaded follow below commands

$ tar -xvzf Postman-linux-x64-7.27.1.tar.gz
$ cd Postman
$ ./Postman
-1

also you need install nodejs:

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs