How to deploy a package in another operating system - deployment

I have a project written in C++ 14 (compiled in my machine with GCC 6.2) and my machine run on Fedora 26. Now I need to deploy into customer's server that run RedHat 6, and GCC 4.8. I can not change or install new things in this server (except my package). But this server doesn't contain 2 package that required to my project is numactl and hwloc.
If I build these library as static library and import into my project (in Fedora 26), then package these library with my project into a RPM package, will it run on the server.
Is it the best way? I never do this work before.
I'm sorry for my English.

You need to build your package for RedHat 6. Create source rpm (src.rpm) and run:
mock -r epel-6-x86_64 your-package.src.rpm
This way you will get package which can be installed on RHEL6.

Related

How to install Oracle SQL Developer on Linux (Pop!_OS)

I am trying to install SQL Developer on my laptop. I've download the file from Oracle and follow the instruction, I have RPM installed, but when I run rpm -Uhv sqldeveloper-21.4.3-063.0100.noarch.rpm, I encountered the following:
rpm: RPM should not be used directly install RPM packages, use Alien instead!
rpm: However assuming you know what you are doing...
warning: RPM v3 packages are deprecated: sqldeveloper-21.4.3-063.0100.noarch
error: Failed dependencies:
/bin/sh is needed by sqldeveloper-21.4.3-063.0100.noarch
What can I try next?
It looks like you are trying to run a package made for redhat based systems, but PopOS is debian based.
To proceed with the installation you must first install rpm2cpio, then you can extract it by running the command "# rpm2cpio datamodeler-21.4.2.059.0838-1.noarch.rpm", then you can access the extracted directory.
Then you can use the command "# ./sqldeveloper.sh" to run the application.
But, ensure you have a JDK installed You will be prompted to enter a jdk path. (ie usr/java/jdk1.8.0_181) SQL Developer will automatically launch once jdk location is provided

How install Nuget Microsoft.ML.OnnxRuntime.Gpu for ONNX Runtime in Ubuntu 18?

I'm trying to use ONNX runtime for Ubuntu: https://onnxruntime.ai/
I selected Linux, C++, x64, then CUDA. It says "Install Nuget package Microsoft.ML.OnnxRuntime.Gpu
Refer to docs for requirements."
When I click on "Microsoft.ML.OnnxRuntime.Gpu", I'm taken to https://www.nuget.org/packages/Microsoft.ML.OnnxRuntime.Gpu
There, it just says "Install-Package Microsoft.ML.OnnxRuntime.Gpu -Version 1.8.1". Now what am I supposed to do?
They expect you to install nuget in linux with
sudo apt-get install -y nuget
And then run the following with the version you want installed.
nuget install Microsoft.ML.OnnxRuntime.Gpu -Version 1.12.0
That's the expected approach. Personally, for me that didn't work. I kept getting some error saying "'Microsoft.ML.OnnxRuntime.Managed' already has a dependency defined for 'System.Memory'." So I did it a different way. I just went to https://github.com/microsoft/onnxruntime/releases/tag/v1.12.0. And then at the bottom under assets it lists pre-built .tgz packages for the different setups. You can just download one and unpack it.

IBM Blockchain platform cannot rebuild native dependencies

I trying to get the IBM Blockchain platform to work in Visual studio code (on Linux), but it keeps coming back with:
Could not rebuild native dependencies Failed to execute command "npm" with arguments
"rebuild, grpc, --target=6.1.5, --runtime=electron, --update-binary, --fallback-to-build, --
target_arch=x64, --dist-url=https://atom.io/download/electron" return code 1. Please ensure
that you have node and npm installed
I have node and npm installed
node -v
v10.17.0
and
npm -v
6.11.3
satisfying the constraints. I have visual studio code version 1.41.1. What could be thie issue?
The problem you are experiencing is described in this issue https://github.com/IBM-Blockchain/blockchain-vscode-extension/issues/1621
The issue is that there are no pre-built versions of grpc used by the fabric node sdk for electron 6 currently and due to changes in newer versions of gcc the grpc node module fails to compile when it falls back to using source because of no pre-built versions
The easiest solution is to downgrade for vscode 1.39 and install the extension.
Alternative options are to install gcc version 7 and make that the default in your linux environment or you could install a version of linux that has gcc version 7 as the default for example ubuntu 18.04 (which would allow grpc to compile from source)

Different versions of rpmbuild list different dependencies

I am building a netbeans 8.1 platform application for CentOS6 and CentOS7. These OS's host rpmbuild 4.8.0 and 4.11.3 respectively.
On each OS, I can package the application into a ZIP file distribution in the netbeans 8.1 IDE, which is then referenced in my .spec file.
On both OS, the resulting rpm is built fine (by which I mean, an rpm is produced with no errors).
When I install the rpm on CentOS6, it installs fine and the application runs.
When I install the rpm on CentOS7, rpm returns the following error:
D: Requires: osgi(org.tmatesoft.sqljet) NO
(In fact I get a bunch of osgi references, but all the others have satisfied dependencies).
If I list the rpm dependencies with
rpm -qpR package.rpm
I get the same list of dependencies on both OS, except that on CentOS7 it finds a bunch of osgi() dependencies - these are not present on CentOS6.
Since the only difference between these two proceedures is the version of rpmbuild I am using, I suspect that this is the problem. However, I'm not sure how best to resolve the problem on CentOS7 - I've tried using --nodeps in the rpmbuild command and I've tried adding module dependencies to the project in netbeans, but to no avail. Any help much appreciated.

GtkMozEmbed module in PyGtk

I'm working on a soloution that needs the gtkMozembed module for python.
I had installed the pygtk2 and genome-python-* packages.
But still i don't have the gtkmozembed module. Can any one tell me how can i install this module.?
I'm also searching for some good repositories for CentOS so that I can update the latest packages. All the repositories now I have, do not maintain the updated packages.
I use CentOs 6.0.
Before continuing, note that gtkmozembed is deprecated, abandoned by the authors and therefore not packaged in CentOS 6 or Ubuntu Oneiric and later:
https://lists.ubuntu.com/archives/ubuntu-devel/2011-May/033229.html
https://groups.google.com/forum/#!topic/mozilla.dev.embedding/c_NMcO-N8wo/discussion
Therefore any use of gtkmozembed is temporary. You may wish to consider the following alternatives which are available as RPM packages on CentOS 6:
pywebkitgtk : Python Bindings for WebKitGTK+
gnome-python2-gtkhtml2 : Python bindings for interacting with gtkhtml2
I managed to download gnome-python2-extras from CentOS 5 and build it on CentOS 6 with the following commands:
rpm -ivh http://vault.centos.org/5.7/os/SRPMS/gnome-python2-extras-2.14.2-7.el5.src.rpm
# edit ~/rpmbuild/SPECS/gnome-python-extras.spec
# comment out the line starting with %patch1
rpmbuild -ba ~/rpmbuild/SPECS/gnome-python-extras.spec