Travis CI + NuGet yields Invalid certificate error - mono

I'm trying to use NuGet on Travis.
- sudo apt-get -qq -y update
- sudo apt-get -qq -y install mono-complete gtk-sharp2
- wget https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
- mono ./nuget.exe install ILMerge -Version 2.14.1208
Unfortunately, I get the following error:
https://api.nuget.org/v3/index.json
Attempting to gather dependency information for package 'ILMerge.2.14.1208' with respect to project '/home/travis/build/craftr-build/craftr/build/.nuget-artifacts', targeting 'Any,Version=v0.0'
Invalid certificate received from server. Error code: 0xffffffff800b0109
I have tried various recommendations from what I found on Google, for example using the following before trying to use NuGet:
- mozroots --import --sync
- yes | certmgr -ssl -m https://go.microsoft.com
- yes | certmgr -ssl -m https://nugetgallery.blob.core.windows.net
- yes | certmgr -ssl -m https://nuget.org
Unfortunately the mozroot command gives
Downloading from 'http://mxr.mozilla.org/seamonkey/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1'...
Couldn't retrieve the file using the supplied information.
Leaving out the mozroots command gives the same NuGet error.
How can I get NuGet to work on Travis?

I just used the APT Addon now. I found the sourcelinse and key_urls in another Mono project here
addons:
apt:
sources:
- sourceline: deb http://download.mono-project.com/repo/debian trusty/snapshots/5.2.0.224 main
key_url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA6A19B38D3D831EF
- sourceline: deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main
key_url: https://packages.microsoft.com/keys/microsoft.asc
- packages:
packages:
- mono-devel
- ca-certificates-mono

Related

tensorflow_model_server: command not found

I've created a folder "Model_en" and the path to my saved model is:
"--model_base_path=/Users/tarunkumar/Documents/tensor_models/Model_en/1/"
also, my model name is:
"--model_name=Model_en"
After running the command:
"tensorflow_model_server --rest_api_port=8501 --model_name=Model_en --model_base_path=/Users/tarunkumar/Documents/tensor_models/Model_en/1/
"
I'm getting the error as:
"bash: tensorflow_model_server: command not found"
The installation may not have happen properly. For safer side, first remove the corrupt packages that may have installed,
apt-get remove tensorflow-model-server
Then,
Add TensorFlow Serving distribution URI as a package source:
echo "deb [arch=amd64] http://storage.googleapis.com/tensorflow-serving-apt stable tensorflow-model-server tensorflow-model-server-universal" | sudo tee /etc/apt/sources.list.d/tensorflow-serving.list && curl https://storage.googleapis.com/tensorflow-serving-apt/tensorflow-serving.release.pub.gpg | sudo apt-key add -
To this, you should get OK as output in the terminal.
Install and update TensorFlow ModelServer:
apt-get update && apt-get install tensorflow-model-server
Once installed, upgrade to a newer version of tensorflow-model-server with:
apt-get upgrade tensorflow-model-server
The binary can now be invoked using the command tensorflow_model_server
You may get output,
Failed to start server. Error: Invalid argument: Both server_options.model_base_path and server_options.model_config_file are empty!
This means the installation is successful and you can run the command to start the server.
source
This may help as well, at least it worked for me.
pip install tensorflow-serving-api
You have to install it first. Here is how it is done on Debian/Ubuntu:
Installation
Add TensorFlow Serving distribution URI as a package source (one time setup)
echo "deb [arch=amd64] http://storage.googleapis.com/tensorflow-serving-apt stable tensorflow-model-server tensorflow-model-server-universal" | sudo tee /etc/apt/sources.list.d/tensorflow-serving.list && \
curl https://storage.googleapis.com/tensorflow-serving-apt/tensorflow-serving.release.pub.gpg | sudo apt-key add -
Install and update TensorFlow ModelServer
apt-get update && apt-get install tensorflow-model-server
Once installed, the binary can be invoked using the command tensorflow_model_server.
You can upgrade to a newer version of tensorflow-model-server with:
apt-get upgrade tensorflow-model-server

Unable to install required package (rabbitmq-server) before Travis CI build

Since today I experience the following issue with Travis CI: the required package specified in before_install section of .travis.yml:
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq rabbitmq-server
cannot be installed, breaking the build.
Response as shown Travis console log:
$ sudo apt-get update -qq
W: http://ppa.launchpad.net/couchdb/stable/ubuntu/dists/trusty/Release.gpg: Signature by key 15866BAFD9BCC4F3C1E0DFC7D69548E1C17EAB57 uses weak digest algorithm (SHA1)
$ sudo apt-get install -qq rabbitmq-server
E: Unable to correct problems, you have held broken packages.
The command "sudo apt-get install -qq rabbitmq-server" failed and exited with 100 during .
Your build has been stopped.
How would I overcome this problem? I have tried to replicate the issue locally, but it seems to be not reproducible.
I searched Google with this search string - "failed and exited with 100" apt install - this is the first hit:
https://github.com/travis-ci/travis-ci/issues/7998

openssl / ctls trouble with vapor 2

How can I fix these OpenSSL / TLS issues I'm getting with Vapor 2? They are preventing me from compiling my project on the command line and in Xcode.
During SPM build:
note: you may be able to install ctls using your system-packager:
brew install ctls
note: you may be able to install ctls using your system-packager:
brew install openssl
Upon failure of SPM build:
Linking ./.build/debug/Run
ld: library not found for -lcrypto for architecture x86_64
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: build had 1 command failures
error: exit(1): /Library/Developer/Toolchains/swift-3.1-DEVELOPMENT-SNAPSHOT-2017-03-07-a.xctoolchain/usr/bin/swift-build-tool -f /Users/tanner/Desktop/PackageConfig/.build/debug.yaml
Also in SPM:
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "shim.h"
^
/Users/tanner/Desktop/PackageConfigTwo/.build/checkouts/ctls.git-9210868160426949823/shim.h:4:10: error: 'openssl/conf.h' file not found
#include <openssl/conf.h>
^
/Users/tanner/Desktop/PackageConfigTwo/.build/checkouts/crypto.git-7980259129511365902/Sources/Crypto/Cipher/Cipher+Method.swift:1:8: error: could not build Objective-C module 'CTLS'
import CTLS
^
In Xcode:
/Users/tanner/PackageConfig/.build/checkouts/ctls.git-9210868160426949823/shim.h:4:10: 'openssl/conf.h' file not found
/Users/tanner/PackageConfig/.build/checkouts/crypto.git-7980259129511365902/Sources/Crypto/Cipher/Cipher+Method.swift:1:8: Could not build Objective-C module 'CTLS'
ld: library not found for -lssl
This error means OpenSSL is either not installed or not being properly linked. There are three solutions to this problem.
Option 1: Use Vapor Toolbox (Recommended)
Install the latest version of the Vapor toolbox.
If you have already installed the toolbox, try uninstalling it first:
which vapor
rm -rf /path/to/vapor
1.1 Install (macOS)
Add Vapor's Homebrew Tap
brew tap vapor/homebrew-tap
Update Homebrew and install the toolbox.
brew update
brew install vapor
1.2 Install (Ubuntu)
Add Vapor's APT repo.
Quick Script
eval "$(curl -sL https://apt.vapor.sh)"
Manual
wget -q https://repo.vapor.codes/apt/keyring.gpg -O- | sudo apt-key add -
echo "deb https://repo.vapor.codes/apt $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/vapor.list
Install
sudo apt-get update
sudo apt-get install vapor
1.3 Done
You should now have access to the vapor program and all required dependencies should be installed.
vapor build
vapor xcode
swift build and related commands should now also work normally.
swift build
swift package generate-xcodeproj
Option 2: Install Vapor's CTLS Package
2.1 Install (macOS)
Add Vapor's Homebrew Tap
brew tap vapor/homebrew-tap
Update Homebrew and install CTLS
brew update
brew install ctls
Restart your terminal, re-generate your Xcode project (if using Xcode), and try again.
2.2 Install (Ubuntu)
Add Vapor's APT repo.
Quick Script
eval "$(curl -sL https://apt.vapor.sh)"
Manual
wget -q https://repo.vapor.codes/apt/keyring.gpg -O- | sudo apt-key add -
echo "deb https://repo.vapor.codes/apt $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/vapor.list
Update APT and install CTLS.
sudo apt-get update
sudo apt-get install ctls
2.3 Done
swift build and other commands should now work normally.
Option 3: Manually Install and Link OpenSSL or Equivalent
3.1 Install (macOS)
Install OpenSSL (or any other similar SSL library)
brew install openssl
brew install libressl
3.2 Install (Ubuntu)
Install OpenSSL (or any other similar SSL library)
sudo apt-get install libssl-dev
3.3 Finding Linker Flags
You can use pkg-config (available on brew and apt) to find linker flags or most packages.
pkg-config <package-name> --cflags
pkg-config <package-name> --libs
However, OpenSSL installed through Homebrew cannot be linked and thus does not work with pkg-config. These flags should work:
include: /usr/local/opt/openssl/include
libs: /usr/local/opt/openssl/lib
Note, some libraries will be installed into /usr/include and /usr/lib which does not require explicit linker flags. OpenSSL through APT is installed this way.
3.4 Using Linker Flags
Linker flags can be added during swift build
swift build -Xswiftc -I/path/to/include -Xlinker -L/path/to/lib
They can also be added during Xcode project generation.
swift package -Xswiftc -I/path/to/include -Xlinker -L/path/to/lib generate-xcodeproj
#tanner0101 your suggestions here https://github.com/vapor/vapor/issues/937 have not resolved the issue for me. I get the CTLS is missing error not only on High Sierra but also on Ubuntu inside a Docker container.
The project is manually executable but MySQL does not work. I think that this https://github.com/vapor/vapor/issues/954 and this https://github.com/uchicago-cloud/mpcs51033-2017-spring-forum/issues/54 are not just deployment on Heroku issues.

Travis CI for a Qt5 project

I am trying to use Travis CI with a Qt5 project, but I can't get the build to pass.
My .travis.yml
install:
- sudo apt-get update
- sudo apt-get install qt5-default qttools5-dev-tools
script:
- qmake -project
- qmake Ultron.pro
- make
Last segment of the error log:
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.
Full log: http://pastebin.ubuntu.com/8296581/
Does this have something to do with it not being an official package?
You need to add the correct repository and update apt:
sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa
sudo apt-get update -qq
Your .travis.yml will then look like:
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
see: Travis CI config to build against Qt5.0 on Ubuntu 12.04. Requires installing a PPA and certain packages for qt5 support. (jreese / gist:6207161)

Compiling libapache2-svn for Apache 2.4.4

I want to use Apache 2.4.4 with SVN on Ubuntu server 12.04 (Precise Pangolin). But when I use
apt-get install libapache2-svn
I get the following dependencies error
The following packages have unmet dependencies:
libapache2-svn : Depends: apache2.2-common but it is not going to be installed
Googling around I got some suggestion about compiling from source by hand. I don't know how to do that. How can I do it?
I have two solutions:
Follow the instructions in this Server Fault Q&A.
*Note: Create another user if you're using a root account on the server.
I've asked Ondřej Surý on Launchpad to add Subversion to his Apache PPA. You can add Ondřej Surý's PPA to perform a normal update/upgrade.
You did ask Ondrej to include Subversion in his PPA launchpad. But I couldn't install the libapache2-svn package after adding Ondrej's PPA.
Somehow the instructions provided for compiling didn't work for me so here's an alternative way to get it working.
Reference:
(https://askubuntu.com/questions/312568/where-can-i-find-a-subversion-1-8-binary)
WANDisco has Subversion 1.8 for Ubuntu then:
sudo sh -c 'echo "# WANdisco Open Source Repo" >> /etc/apt/sources.list.d/WANdisco.list'
sudo sh -c 'echo "deb http://opensource.wandisco.com/ubuntu precise svn18" >> /etc/apt/sources.list.d/WANdisco.list'
wget -q http://opensource.wandisco.com/wandisco-debian.gpg -O- | sudo apt-key add -
sudo apt-get update
After that:
apt-cache show subversion | grep '^Version:'
And then you should be good to install normally:
sudo apt-get install subversion libapache2-svn