无法安装 pgmodeler

Cannot install pgmodeler

我在 Mac 上编译 pgmodeler 时遇到问题。我在二进制文件夹中输入 qmake pgmodeler.pro,出现以下错误:

 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:21: defined(function, type): unexpected type [var].
 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:24: defined(function, type): unexpected type [var].
 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:103: defined(function, type): unexpected type [var].
 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:104: defined(function, type): unexpected type [var].
 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:105: defined(function, type): unexpected type [var].
 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:106: defined(function, type): unexpected type [var].
 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:107: defined(function, type): unexpected type [var].
 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:108: defined(function, type): unexpected type [var].
 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:109: defined(function, type): unexpected type [var].
 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:110: defined(function, type): unexpected type [var].
 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:111: defined(function, type): unexpected type [var].
 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:112: defined(function, type): unexpected type [var].
 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:113: defined(function, type): unexpected type [var].

你如何编译pgModeler?目前我只能描述我的情况。

我的pgModeler编译之路

我的 Linux Mint 17.1 (x64) 也遇到了几乎相同的问题。我遵循了本教程:http://www.pgmodeler.com.br/wiki/doku.php?id=installation

首先,我使用 apt 安装了一些必需的软件包: sudo apt-get install libpq-dev libxml2-dev

接下来我从 https://github.com/pgmodeler/pgmodeler/tags

下载了最新版本的 pgModeler

在LinuxMint 的repo 中只有Qt4 版本,所以我必须使用官方Qt 站点的安装程序来安装Qt5。我刚刚下载了社区版并按照说明进行操作。 接下来,我只需要通过在 /etc/environment 中添加到我的 PATH 来指定新 Qt 库的路径(~/.bashrc 也是一个很好的地方)$QT_DIR/Tools/QtCreator/bin$QT_DIR/5.4/gcc_64/bin(它们是在我的情况下,您可以将其更改为类似的)。

我只剩下在终端中输入 qmake pgmodeler.pro && make && sudo make install 并等待进程结束。

我的英语还有很多不足之处,请多多指正。

kamarkiewicz 的回答中的教程 link 现在无处可去,所以我 post 在这里 认为 是Ubuntu.

中构建所需的完整软件包列表
sudo apt-get install postgresql-9.3 postgresql-client-9.3 libpq5 libpq-dev clang libxml2-dev qt5-default libqt5svg5-dev

开头的 PostgreSQL 内容很明显,但我想我还是要提一下。在那些之后:

  • libpq5libpq-dev 是 PostgreSQL 开发库。
  • clang 是 pgModeler 构建过程中使用的编译器。
  • pgModeler 需要
  • libxml2-dev
  • pgModeler 必须使用 QT5 构建,因此安装 qt5-default 可以获得 QT5 开发包并将其设置为默认 QT 版本。
    • 在命令行上用 qmake -v 测试它并验证它说它正在使用 QT5。
  • 需要QT的SVG模块; libqt5svg5-dev 提供了这个。
    • Answer 21100312

如果有人碰巧发现我已经安装的其他软件包,请对此答案发表评论,我很乐意对其进行编辑。