I have a salt formula. On server I am using wkhtmltopdf tools. Ubuntu repo has this tool but it has an older version. I want to use the latest version.
I am doing the following to get it installed on minions manually.
$ wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
$ sudo apt-get install fontconfig libfontenc1 libjpeg-turbo8 libxfont1 x11-common xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils libxrender1
$ sudo dpkg -i wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
I can do cmd.run for all these commands. Is there any better way of doing any of these steps?
You can specify a remote sources option in a Salt pkg state. You could try something like this
cat stuff.sls
my_pkgs:
- pkg.installed:
- pkgs:
- fontconfig
- libfontenc1
- libjpeg-turbo8
- libxfont1
- x11-common
- xfonts-75dpi
- xfonts-base
- xfonts-encodings
- xfonts-utils
- libxrender1
install_wkhtmltox:
pkg.installed:
- sources:
- wkhtmltox: http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
Related
Does anyone have a solution to get current node / npm versions on Deepin 20?
When trying to install from nodesource I get this:
Confirming "n/a" is supported...
curl -sLf -o /dev/null 'https://deb.nodesource.com/node_14.x/dists/n/a/Release'
Your distribution, identified as "n/a", is not currently supported,
please contact NodeSource at
https://github.com/nodesource/distributions/issues if you think this
is incorrect or would like your distribution to be considered for
support
Although Deepin 20.2 can install Node JS directly from the apt, the version is too old and not maintained anymore.
In addition, the official installation method of NodeJS is problematic as it does not support the Deepin system.
So you need to look at this script setup.14.x to find the actual installation method. Of course, it might be simpler if you already have it installed on Debian or Ubuntu.
You have to completely uninstall Deepin's own version before installing the official version.
sudo apt remove nodejs npm
sudo apt autoremove
Add the following content to
/etc/apt/sources.list.d/nodesource.list:
deb https://deb.nodesource.com/node_14.x buster main
# deb-src https://deb.nodesource.com/node_14.x buster main
Then add the official key and you can install it directly.
curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
sudo apt update
sudo apt install nodejs
Problem fixed with Experience.
Deepin isn't listed as a supported distro for NodeSource.
As a Debian derivative, something like this should work:
# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_14.x | bash -
apt-get install -y nodejs
Otherwise you might try a manual install. If you do, you'll need to specify the buster codename since Deepin 20 is based on Debian 10.5.
This is what worked for me to install NodeJS 12. Paste in terminal the following
VERSION=node_12.x
DISTRO="$(dpkg --status tzdata|grep Provides|cut -f2 -d'-')"
echo "deb https://deb.nodesource.com/$VERSION $DISTRO main" | sudo tee /etc/apt/sources.list.d/nodesource.list
echo "deb-src https://deb.nodesource.com/$VERSION $DISTRO main" | sudo tee -a /etc/apt/sources.list.d/nodesource.list
sudo apt-get update
sudo apt-get install nodejs
this should work for Deepin 20
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
I am following this guide to install couchDB on Ubuntu 16.04. Everytime I tried, it installs only version 1.6.0. I tried installing and unstalling many time but it is not updating and I am getting only above official guide to install it.
What is the way to install the latest version?
You need to tell Ubuntu about the official CouchDB repository:
echo "deb https://apache.bintray.com/couchdb-deb xenial main" | sudo tee -a /etc/apt/sources.list
Be sure to set your distribution correctly, in the above replace xenial with what matches your distribution:
Ubuntu 14.04: trusty
Ubuntu 16.04: xenial
Ubuntu 18.04: bionic
You then also need to trust the new repository, by adding its public key to apt:
curl -L https://couchdb.apache.org/repo/bintray-pubkey.asc | sudo apt-key add -
Then you can install CouchDB with apt:
sudo apt-get update && sudo apt-get install couchdb
See official CouchDB install instructions.
Nodejs version 4 has been released and installed on my windows machine.
I'm trying to install the package trough yum on redhat but i'm not getting the latest version.
i tried: sudo yum install -y nodejs but the lastest 4.0 version is not installed.
How do i install nodejs 4.0 on a redhat machine?
NodeJS 4.X for EL7 repos located at https://rpm.nodesource.com/pub_4.x/el/7/
To install with yum change baseurl in nodesource-el.repo file to:
baseurl=https://rpm.nodesource.com/pub_4.x/el/7/$basearch
/etc/yum.repos.d/nodesource-el.repo content:
[nodesource]
name=Node.js Packages for Enterprise Linux 7 - $basearch
baseurl=https://rpm.nodesource.com/pub_4.x/el/7/$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL
[nodesource-source]
name=Node.js for Enterprise Linux 7 - $basearch - Source
baseurl=https://rpm.nodesource.com/pub_4.x/el/7/SRPMS
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL
gpgcheck=1
You can compile and install from its source.
ver=4.0.0
wget -c https://nodejs.org/dist/v$ver/node-v$ver.tar.gz #This is to download the source code.
tar -xzf node-v$ver.tar.gz
cd node-v$ver
./configure && make && sudo make install
https://github.com/nodejs/node-v0.x-archive/wiki/Installation
Try npm install n -g and then n latest for downloading it with this version manager.
Edit:
The official distributions are managed by Nodesource. For RHEL the setup is supposed to be (take from the repo):
Current instructions for installing, as listed on the Node.js Wiki:
Note that the Node.js packages for EL 5 (RHEL5 and CentOS 5) depend on the EPEL repository being available. The setup script will check and provide instructions if it is not installed.
Run as root on RHEL, CentOS, CloudLinux or Fedora:
curl -sL https://rpm.nodesource.com/setup | bash -
Then install, as root:
yum install -y nodejs
But be aware that 4.0 is currently not in their rpm distribution
This was my solution and it worked:
Distrubution url: Distr: https://nodejs.org/dist/v4.2.1/node-v4.2.1.tar.gz (v4.2.1 for now)
Unpack the package (tar Jxf node-v4.2.1.tar.xz).
Some package could be too old and will cause problems during installation.
cd to the unpacked file and run ”./configure”. if the warming “C++ compiler too old, need g++ 4.8 or clang++ 3.4” is displayed you need to execute the following commands:
curl http://linuxsoft.cern.ch/cern/scl/slc6-scl.repo > /etc/yum.repos.d/slc6-scl.repo
rpm --import http://ftp.mirrorservice.org/sites/ftp.scientificlinux.org/linux/scientific/51/i386/RPM-GPG-KEYs/RPM-GPG-KEY-cern
yum install -y devtoolset-3
And to utilize it without having to set environment variables execute this command:
scl enable devtoolset-3 bash
Now restart the process:
./configure
make
make install
You can try this solution.
First, update software repository to the latest versions:
yum -y update
Intall "Development Tools". It's a group of tools for compiling software from sources.
yum -y groupinstall "Development Tools"
Move to /usr/src directory - the usual place to hold software sources.
cd /usr/src
Now, we pick the latest compressed source archive from Node.js website at http://nodejs.org/download/.
wget http://nodejs.org/dist/v4.2.4/node-v4.2.4.tar.gz
tar zxf node-v4.2.4.tar.gz
cd node-v4.2.4
./configure
make
make install
So, our mono was updated from 3.12.0 to 4.0.1 and caused a bunch of problems with nunit as seen here: New SIGABRT after upgrading to Mono 4 running NUnit tests While upgrading to 4.1.0 snapshot fixes these issues, it hasn't been officially released and we would not like to use it. Instead we'd like to downgrade back to 3.12.0 but it seems that I can't even do that. Running apt-cache showpkg mono-complete gives me only the following options
matt#matt-T420:~/vw3$ apt-cache showpkg mono-complete
Package: mono-complete
Versions:
4.0.1-0xamarin4 (/var/lib/apt/lists/download.mono-project.com_repo_debian_dists_wheezy_main_binary-amd64_Packages)
Description Language:
File: /var/lib/apt/lists/ca.archive.ubuntu.com_ubuntu_dists_vivid_universe_binary-amd64_Packages
MD5: dacc30c6a4347277b44c68a99c998d5f
Description Language: en
File: /var/lib/apt/lists/ca.archive.ubuntu.com_ubuntu_dists_vivid_universe_i18n_Translation-en
MD5: dacc30c6a4347277b44c68a99c998d5f
3.2.8+dfsg-4ubuntu4 (/var/lib/apt/lists/ca.archive.ubuntu.com_ubuntu_dists_vivid_universe_binary-amd64_Packages)
Description Language:
File: /var/lib/apt/lists/ca.archive.ubuntu.com_ubuntu_dists_vivid_universe_binary-amd64_Packages
MD5: dacc30c6a4347277b44c68a99c998d5f
Description Language: en
File: /var/lib/apt/lists/ca.archive.ubuntu.com_ubuntu_dists_vivid_universe_i18n_Translation-en
MD5: dacc30c6a4347277b44c68a99c998d5f
However if I browse to http://origin-download.mono-project.com/repo/debian/dists/wheezy/snapshots/3.12.0/ I can see the package but I'm not sure how to add it to my list of repos. I don't know how to modify echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list to pint to that 3.12.0 folder.
I basically just want to blow away mono-4.0, reinstall 3.12.0 and then pin/hold it at that version. Can someone please help?
First remove mono 4.0.1
sudo apt-get remove mono-complete
sudo apt-get purge mono-complete
sudo apt-get autoremove
After a few attempts, I have modified my repo like this, which seems to have worked:
echo "deb http://download.mono-project.com/repo/debian wheezy/snapshots/3.12.0 main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
then ran:
sudo apt-get update
sudo apt-get install mono-complete
mono --version
I am now running 3.12
Downgrading packages with apt is a bit of a pain.
you'll basically need to "apt-get install libfoo=3.12.1-0xamarin4" with every upgraded lib on the same command line.
Source: https://twitter.com/directhex/status/596382226121674752 (from the creator of the Mono packages)
You can add the snapshot of old packages repo by following http://www.mono-project.com/docs/getting-started/install/linux/#accessing-older-releases