【问题标题】:Cannot install pgmodeler无法安装 pgmodeler
【发布时间】:2015-08-22 20:58:45
【问题描述】:

我在 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].

【问题讨论】:

标签: postgresql pgmodeler


【解决方案1】:

如何编译 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

在 Linux Mint 的 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 并等待进程结束。

我的英语还有很多不足之处,所以请给我一些更正。

【讨论】:

  • 我没有使用 Qt5。我用过 Qt4,“qmake”在我的环境中表示 Qt4。所以我修改了 /usr/local/bin/ 中的符号链接。非常感谢。
  • 我成功命令 'qmake pgmodeler.pro && make && sudo make install' 并创建 pgModeler.app 。但是当我打开 pgModeler.app 时出现错误。所以我会在这周再次尝试安装。谢谢。
【解决方案2】:

kamarkiewicz 的答案中的教程链接现在无处可去,所以我将在这里发布我认为是您在 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 构建过程中使用的编译器。
  • libxml2-dev 是 pgModeler 所必需的。
  • pgModeler 必须使用 QT5 构建,因此安装 qt5-default 可以获得 QT5 开发包并将其设置为默认 QT 版本。
    • 在命令行上使用qmake -v 进行测试,并验证它是否说它使用的是 QT5。
  • 需要 QT 的 SVG 模块; libqt5svg5-dev 提供了这一点。

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

【讨论】:

    猜你喜欢
    • 2021-07-26
    • 2020-10-12
    • 2023-01-30
    • 2014-01-08
    • 2011-10-17
    • 2018-06-04
    • 2014-12-05
    • 2015-12-28
    • 1970-01-01
    相关资源
    最近更新 更多