Install Qt5.13 on travis-ci linux - linux

At first, I'm trying to install Qt with apt-get install qtchooser libgl-dev qt5-default qttools5-dev-tools python3.6 qtwebengine5-dev.
However, this install a Qt version of 5.9.
And I have tried to install Qt by using
sudo wget http://download.qt.io/official_releases/qt/5.13/5.13.1/qt-opensource-linux-x64-5.13.1.run;
sudo chmod +x ./qt-opensource-linux-x64-5.13.1.run;
sudo ./qt-opensource-linux-x64-5.13.1.run;
And this gave another error:
QStandardPaths: wrong ownership on runtime directory /run/user/2000, 2000 instead of 0
qt.qpa.screen: QXcbConnection: Could not connect to display
Could not connect to any X display
What is the proper solution to install Qt 5.13 on travis-ci linux?
Based on two people's answer(thank you very much), I have update my .travis.yml like this:
addons:
apt:
sources:
- sourceline: 'ppa:beineri/opt-qt-5.13.2-bionic'
packages:
- qt513base
- qt513tools
- qt513webengine
- qt513x11extras
- qt513translations
- qt513scxml
- qt513script
However, another error appear:
ome packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
qt513webengine:i386 : Depends: qt513base:i386 but it is not going to be installed
Depends: qt513declarative:i386 but it is not going to be installed
Depends: qt513location:i386 but it is not going to be installed
Depends: qt513quickcontrols2:i386 but it is not going to be installed
Depends: qt513webchannel:i386 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
How to solve that?

I could use some of the alternatives shown in the answers to question Silent install Qt run installer on ubuntu server.
In this case I see that the simplest solution is to use qtci:
language: generic
dist: bionic
addons:
apt:
packages:
- libxkbcommon-x11-0
- libgl1-mesa-dev
services:
- xvfb
env:
- QT_CI_PACKAGES=qt.qt5.5132.gcc_64,qt.qt5.5132.qtwebengine PATH="$TRAVIS_BUILD_DIR/Qt/5.13.2/gcc_64/bin:${PATH}"
script:
- git clone https://github.com/benlau/qtci.git
- source qtci/path.env
- install-qt 5.13.2
In this project I use the previous script to run an example of Qt.

You can use one of Stephan Binner's launchpad repositories containing builds of recent Qt versions.
For example, if you want to use Qt 5.13.1, you can write the following in your .travis.yml's install section (assuming you use xenial build image):
sudo apt-add-repository -y ppa:beineri/opt-qt-5.12.1-xenial &&
travis_wait 30 sudo apt-get -qq update &&
sudo apt-get -qq install qt512tools qt512base &&
source /opt/qt512/bin/qt512-env.sh
Add other Qt packages as you need.
Also a note on one of the errors you see: the one about not being able to connect to any X display. If whatever you want to run on Travis CI normally requires GUI to run, you can use xvfb to work around this issue: for this to work you need to add the following to the top level of your .travis.yml:
services:
- xvfb

Try to add the ppa manually in your travis configuration:
- os: linux
dist: bionic
sudo: require
addons:
apt:
sources:
- sourceline: 'ppa:beineri/opt-qt-5.13.2-bionic'
packages:
- qt513base

Related

Implementing the right conditions for a yum command for centos5 in Ansible

I'm currently working with a centos5 host and I have to install some packages with yum.. unfortunately, as far as I know, centos5 doesn't support Ansible's yum module so I have to use the 'command' or 'shell' modules and 'hard code' everything by myself.
My question is.. what are the conditions I should implement to make a command/shell behave like Ansible's yum module and make it as much 'indepotent' as possible?
For the moment this is what I came up with:
When installing/updating a package
- name: INSTALL (C5) - Install package
ansible.builtin.command:
cmd: yum -y install <package>
register: output_install
changed_when: '"Installing:" in output_install["stdout"] or "Updating:" in output_install["stdout"]'
failed_when: output_install["stdout"] is regex("No package.*available")
When removing a package
- name: UNINSTALL (C5) - Remove package
ansible.builtin.command:
cmd: yum -y remove <package>
register: output_remove
changed_when: '"Erasing" in output_remove["stdout"]
failed_when: "No Packages marked for removal" in output_remove["stdout"]'
Do you guys have any suggestion or have already dealt with this problem?
Thank you very much.

Gazebo 11 does not run

I have installed Gazebo 11 on Ubuntu 20.04 through binary packages. When I launch Gazebo it raises the following error:
gzserver: error while loading shared libraries: libdart-collision-bullet.so.6: cannot open shared object file: No such file or directory
Does anyone know what is the problem? I tried to solve the problem installing libdart-collision-bullet-dev, but the following problem raises:
The following packages have unmet dependencies:
libdart-collision-bullet-dev : Depends: libdart-dev but it is not going to be installed
Depends: libdart6-collision-bullet (= 6.9.2-2build4) but 6.9.5-1885~202012292349~ubuntu20.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.
I tried to solve the broken packages, but then Gazebo 11 is automatically uninstalled.
Thanks in advance.
I had the same problem, and this is what worked for me.
First remove and purge all the libdart packages.
sudo apt remove --purge libdart*
If you have added dartsim/ppa ppa from this link, remove it from Software & Updates -> Other Software
Update
sudo apt update
Check if libdart-dev installs with:
sudo apt install libdart-dev
If it installs, then install all the packages required for Gazebo
sudo apt install libdart-all-dev
If there is an error related to unable to fetch some archives, try:
sudo apt update --fix-missing
sudo apt install libdart-all-dev
Install Gazebo again with:
curl -sSL http://get.gazebosim.org | sh
Check if Gazebo is now working
gazebo

Problem with moby packages when installing docker-ce on CentOS 7

I have a docker image for CentOS 7 which installs docker-ce via the recommended instructions.
i.e.
RUN yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
RUN yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
RUN yum update -y
RUN yum install -y docker-ce docker-ce-cli containerd.io
Recently this stopped working and now fails as follows:
--> Processing Conflict: moby-containerd-1.3.6+azure-1.x86_64 conflicts containerd
--> Processing Conflict: moby-runc-1.0.0~rc10+azure-2.x86_64 conflicts runc
--> Finished Dependency Resolution
Error: moby-containerd conflicts with containerd.io-1.2.13-3.2.el7.x86_64
Error: moby-runc conflicts with containerd.io-1.2.13-3.2.el7.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
The command '/bin/sh -c yum install -y docker-ce docker-ce-cli containerd.io' returned a non-zero code: 1
If the install command is replaced with:
yum install -y docker
I get a different error to do with an unsigned package:
Package runc is obsoleted by moby-runc, trying to install moby-runc-1.0.0~rc10+azure-2.x86_64 instead
...
Package moby-runc-1.0.0~rc10+azure-2.x86_64.rpm is not signed
I tried forcing use of a few old versions as below to no avail e.g.
RUN yum install -y docker-1.13.1-102.git7f2769b.el7.centos
Why is this happening? How can I fix it? And how can I prevent similar problems in the future?
Update: A critical missing piece of information from this question is the use of Azure. I had the following as aspnetcore is required to publish packages in an Azure devops pipeline:
RUN rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
RUN yum update -y && yum install aspnetcore-runtime-3.1 -y
my repo's needed to be updated --- the following resolved me:
curl https://packages.microsoft.com/config/rhel/7/prod.repo > ./microsoft-prod.repo
sudo cp ./microsoft-prod.repo /etc/yum.repos.d/
yum update -y
https://learn.microsoft.com/en-us/windows-server/administration/linux-package-repository-for-microsoft-software
The Answer from user8475213 worked for me. But I had to run after these commands also:
yum clean metadata
Caveat: Usually disclaimers apply. This is only what I think, I may be mistaken. Please comment / suggest edits if so.
How can I fix it?
This was actually a problem with the baseurl of a repo not the docker-ce repo (though I did originally file a bug report there (see issue #11198).
The moby packages come from "packages-microsoft-com-prod".
It seems the baseurl has changed.
The correct one is now:
baseurl=https://packages.microsoft.com/rhel/7/prod/
installed via:
RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo >/etc/yum.repos.d/microsoft-prod.repo
The one with the dodgy packages is:
baseurl=https://packages.microsoft.com/centos/7/prod/
Installed via:
RUN rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
The moby packages exist only in the CentOS repo which is possibly defunct, as Microsoft themselves have changed installation documentation in various places.
There was also a workaround. You can exclude the 'moby' packages until they are really ready as in:
RUN yum install -y docker --exclude=moby-\*
Why is this happening?
I think this is caused by overly aggressive promotion of moby replacements for docker-ce functionality.
It is hopefully a transient state while they are working things out.
That the package moby-runc-1.0.0~rc10+azure-2.x86_64.rpm is not signed suggests a problem with the build process used. This package ought only to be available to beta testers. Certainly not in a repository marked "stable".
How can I prevent similar problems in the future?
Contrary to popular myths, using docker does not completely isolate you from changes in the environment. The repositories used by your docker files are themselves part of the environment. If that environment changes, as in this case, then your reproducible build may cease to be reproducible. The only real way to avoid that is to host your own repositories which comes at a high price. Usually external repositories are stable enough that this is not an issue.
You should consider specifying specific versions of packages to install in your dockerfile to avoid getting unexpected upgrades. However, that will not help you in cases like this where a package is obsoleted and replaced.
Related problem in RHEL 8
Seems that azure depends on packages from the container-tools module, and Docker conflicts with these packages.
# dnf remove #container-tools

PhpStorm Installation issue on Ubuntu 14.04

I am back here again with one more issue that I am having installing PhpStorm on my Ubuntu 14.04. To do so I followed the following steps:
Step 1. sudo apt-get purge openjdk* which gave me a long list mostly saying Package is not installed, so not removed. A few examples:
Package 'openjdk-7-dbg' is not installed, so not removed
Package 'openjdk-7-doc' is not installed, so not removed
...
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Step 2: sudo add-apt-repository ppa:webupd8team/java which ended up saying this:
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
oracle-java7-set-default : Depends: oracle-java7-installer but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Step 3: Despite those error messages popped up I went ahead and ran sudo apt-get update which executed OK.
Step 4: Tried to run sudo apt-get install oracle-java7-installer which again popped up a lot of negative remarks!
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
oracle-java7-installer : Depends: java-common (>= 0.24) but it is not installable
Recommends: gsfonts-x11 but it is not installable
E: Unable to correct problems, you have held broken packages.
So I did not go further with rest of the following commands:
sudo apt-get install oracle-java7-set-default
wget http://download-cf.jetbrains.com/webide/PhpStorm-7.1.3.tar.gz
tar -xvf PhpStorm-7.1.3.tar.gz
cd PhpStorm-133.982/bin
./phpstorm.sh
I have no idea what is going wrong! Somebody please help this absolute newbie to install it.
On another note, if PhpStorm fails to install somehow on my PC, please suggest me a good software which runs on Ubuntu with an inbuilt SASS compiler so that I do not have to run a command every time from terminal? And it would be even better if that software I can get for free! PhpStorm is only a 30-day trial.
EDIT
Strange, I'm using PhpStarm on Ubuntu 14.04 and ant works fine. IntelliJ IDEs are really great.
I have these Java from the same repo you are using.
java-common-0.51
java-wrappers-0.1.27
oracle-java7-installer-7u80+7u60arm-0~webupd8~1
Let's try to purge all the Java packages from you system and then install the Oracle Java again.
Use dpkg -l | grep java to discover all the installed java-related packages.
Then, use apt-get purge on all of them.
Skip the javascipt packages of course.
Then, try to install oracle-java7-installer again. I hope it will be installed correctly.
To install Phpstorm in Ubuntu just follow these steps
1.Run sudo apt install snapd
2.Then sudo snap install phpstorm --classic
3.Then type phpstorm in shell and press enter to launch Phpstorm
Read more about these here

Install packages from the Debian Snapshot Archives repo?

The Debian Snapshot Archive describes being able to add the snapshot repositories into /etc/apt/sources.list so that one can install debian binaries using apt-get directly from the archive.
This sounds straight-forward. However, when I configure a vanilla Debian machine as described with sources.list pointing to the snapshot versions of the repos, apt-get install refuses to install the dependencies. For example, the call:
apt-get -o Acquire::Check-Valid-Until=false update \
&& apt-get install -y --no-install-recommends r-base
Results in the error:
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
r-base : Depends: r-base-core (>= 2.11.1-6) but it is not going to be installed
Depends: r-recommended (= 2.11.1-6) but it is not going to be installed
Recommends: r-base-html but it is not going to be installed
E: Broken packages
apt-cache show r-base-core etc show the requested packages and versions exist, so it's not clear why it does not simply install them.
It is easy to illustrate this problem using a Dockerfile, like this, in order to attempt installing debian packages on a vanilla Debian release from any computer running docker.
I note that installing from the snapshot archives works just fine if I grab the specific .deb files from the Snapshot Archive (e.g. this dockerfile), but clearly that is not the intended method outlined on the Debian Snapshot Archive which says to just add the repos to souces.list.
I do not understand exactly why it fails, but I found a work-around:
FROM debian:wheezy
### SNAPSHOTTING: create a new source + preferences for r-* deb pkgs
RUN echo \
'deb http://snapshot.debian.org/archive/debian/20101017/ sid main' > /etc/apt/sources.list.d/snapshot.list \
&& printf "Package: r-*\nPin: origin snapshot.debian.org\nPin-Priority: 990\n" > /etc/apt/preferences.d/snapshot \
&& apt-get -o Acquire::Check-Valid-Until=false update
# install recommended
RUN apt-get install -y --no-install-recommends --allow-unauthenticated r-base-dev
I will send a pull request

Resources