我正在尝试使用Travis CI和Qt5项目,但我无法通过构建。
我的.travis.yml
install:
- sudo apt-get update
- sudo apt-get install qt5-default qttools5-dev-tools
script:
- qmake -project
- qmake Ultron.pro
- make
错误日志的最后一部分:
0.58s$ sudo apt-get install qt5-default qttools5-dev-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package qt5-default
E: Unable to locate package qttools5-dev-tools
The command "sudo apt-get install qt5-default qttools5-dev-tools" failed and exited with 100 during .
Your build has been stopped.
完整日志:http://pastebin.ubuntu.com/8296581/
这与它不是官方包装有关吗?
答案 0 :(得分:11)
您需要添加正确的存储库并更新apt:
sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa
sudo apt-get update -qq
您的.travis.yml
将如下所示:
before_install:
- sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa
- sudo apt-get update -qq
- sudo apt-get install qtbase5-dev qtdeclarative5-dev libqt5webkit5-dev libsqlite3-dev
- sudo apt-get install qt5-default qttools5-dev-tools
script:
- qmake -project
- qmake Ultron.pro
- make