我下载了Postman for Linux(来自https://www.getpostman.com/apps),解压缩.tar.gz文件~/bin/postman
,然后尝试执行~/bin/postman/Postman/Postman
.不幸的是,它导致以下错误:
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.(/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)
在Ubuntu上还有其他安装/启动Postman的方法吗?
是的,您可以使用以下命令安装Postman:
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
你也可以让Postman出现在Unity Launcher中:
cat > ~/.local/share/applications/postman.desktop <您不需要node.js或任何其他依赖与标准Ubuntu开发安装.
有关详细信息,请参阅我们的博客文章:https://blog.bluematador.com/posts/postman-how-to-install-on-ubuntu-1604/.
编辑:Changed icon.png位置 Postman的最新版本稍微改变了他们的目录结构.
对我来说只需使用-f:`sudo ln -s/opt/Postman/Postman/usr/bin/postman -f`
通过`sudo apt-get install libgconf-2-4`安装`libgconf`后,在Ubuntu 18.04上运行良好。
2> Damián Rafae..:首先创建此脚本:
install-postman.sh
$ sudo snap install postman在终端运行它:
$ sudo apt update $ sudo apt install snapd然后创建桌面启动器:
Postman.desktop
#!/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!"如果需要,请将此文件放在桌面上(不要忘记赋予它执行权限).双击,就是这样!
永远感谢Aviskase(github帐号名称).
来源 - > https://gist.github.com/aviskase/e642248c35e400b56e2489430952369f#file-postman-desktop
3> 小智..:sudo snap install postman
这个单一命令对我有用.