CentOS - Has AspNetCore.App 5.0.6 but needs AspNetCore.App 5.0.0 - centos7

I am trying to run a .NET 5 console application (developed on Windows) in a docker container on CentOS 7.
I have the following:
[root#AU4RLBNAGV04A KLM Releases]# dotnet --list-runtimes
Microsoft.AspNetCore.App 3.1.15 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.15 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
But I get this error when I run the container:
[root#AU4RLBNAGV04A KLM Releases]# docker logs klmcontainer
It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '5.0.0' was not found.
- No frameworks were found.
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at:
- https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=5.0.0&arch=x64&rid=debian.10-x64
I tried to install version 5.0.0, but I get this error:
[root#AU4RLBNAGV04A KLM Releases]# sudo yum install aspnetcore-runtime-5.0.0
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
No package aspnetcore-runtime-5.0.0 available.
Error: Nothing to do
How can I resolve this?

Related

I am trying to install libpam-google-authenticator, but not able to install, in centos machine, please suggest or tell me the alternate way or command

yum install libpam-google-authenticator python3-pip
Loaded plugins: copr, fastestmirror, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
base: mirrors.nxtgen.com
elrepo: mirror-hk.koddos.net
epel: repo.extreme-ix.org
extras: mirrors.nxtgen.com
updates: centos.excellmedia.net
No package libpam-google-authenticator available.
Package python3-pip-9.0.3-8.el7.noarch already installed and latest version
Nothing to do
Because of the openvpn totp is not validating from google authenticator

How to fix yum update error: "Error: requested datatype primary not available"

I'm running a CentOS 7 web server which uses remi repository for updating php version to 7.3.
When I try to update the system using yum:
yum update
I get the following error message: Error: requested datatype primary not available
What I tried:
I googled it and found this solution and I found that the problem was the remi repository so I ran
yum clean all --verbose
then
yum --disablerepo="remi*" update
and I could update the system, all but php 7.3!
Additional info:
The content of the repo file located in /etc/yum.repos.d/remi-php73.repo is:
# This repository only provides PHP 7.3 and its extensions
# NOTICE: common dependencies are in "remi-safe"
[remi-php73]
name=Remi's PHP 7.3 RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/php73/$basearch/
#mirrorlist=https://rpms.remirepo.net/enterprise/7/php73/httpsmirror
mirrorlist=http://cdn.remirepo.net/enterprise/7/php73/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-php73-debuginfo]
name=Remi's PHP 7.3 RPM repository for Enterprise Linux 7 - $basearch - debuginfo
baseurl=http://rpms.remirepo.net/enterprise/7/debug-php73/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-php73-test]
name=Remi's PHP 7.3 test RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/test73/$basearch/
#mirrorlist=https://rpms.remirepo.net/enterprise/7/test73/httpsmirror
mirrorlist=http://cdn.remirepo.net/enterprise/7/test73/mirror
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
[remi-php73-test-debuginfo]
name=Remi's PHP 7.3 test RPM repository for Enterprise Linux 7 - $basearch - debuginfo
baseurl=http://rpms.remirepo.net/enterprise/7/debug-test73/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
which I get installing using the guide on Remi's website
yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
I finally found the solution.
I edited the file vim /etc/yum.repos.d/remi-php73.repo and changed the commented lines marked with ->
[remi-php73]
name=Remi's PHP 7.3 RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/php73/$basearch/
-> mirrorlist=https://rpms.remirepo.net/enterprise/7/php73/httpsmirror
-> #mirrorlist=http://cdn.remirepo.net/enterprise/7/php73/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
It looks like there's some problem with the repo URLs.

Deploy Postgres11 to Elastic Beanstalk - Requires /etc/redhat-release

I'm having a hell of a time deploying my first app to Elastic Beanstalk and could really use some help. I cannot get Postgres11 to install though it is officially supported with RDS.
ISSUE
If I run eb deploy I get the message saying pg_config executable not found. It is required to build psycopg2 from source.
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'project_urls'
warnings.warn(msg)
running egg_info
creating pip-egg-info/psycopg2.egg-info
writing pip-egg-info/psycopg2.egg-info/PKG-INFO
writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option: ...
I suppose I'll need to add the repo? Fair enough. Next I try adding the repo as I have found in other posts across the internet:
[ec2-user#ip-... etc]$ sudo yum -y install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm
Loaded plugins: priorities, update-motd, upgrade-helper
pgdg-centos11-11-2.noarch.rpm | 5.6 kB 00:00:00
Examining /var/tmp/yum-root-cQJP_4/pgdg-centos11-11-2.noarch.rpm: pgdg-redhat-repo-42.0-4.noarch
Marking /var/tmp/yum-root-cQJP_4/pgdg-centos11-11-2.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package pgdg-redhat-repo.noarch 0:42.0-4 will be installed
--> Processing Dependency: /etc/redhat-release for package: pgdg-redhat-repo-42.0-4.noarch
--> Processing Dependency: /etc/redhat-release for package: pgdg-redhat-repo-42.0-4.noarch
--> Finished Dependency Resolution
Error: Package: pgdg-redhat-repo-42.0-4.noarch (/pgdg-centos11-11-2.noarch)
Requires: /etc/redhat-release
From here I'm stuck. I've tried symlinking /etc/system-release -> /etc/redhat-release with no luck. Nobody else seems to have this problem? I also don't seem to have the coveted amazon-linux-extras for some reason?
Environment
Environment tier: Web Server
Platform: Python 3.6 running on 64bit Amazon Linux/2.8.2
.ebextensions/packages.config
packages:
yum:
postgresql11-devel: []
requirements.txt
Django==2.2
psycopg2==2.8.2
pytz==2019.1
sqlparse==0.3.0
[ec2-user#ip-... etc]$ cat /etc/os-release
NAME="Amazon Linux AMI"
VERSION="2018.03"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2018.03"
PRETTY_NAME="Amazon Linux AMI 2018.03"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2018.03:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"
[ec2-user#ip-... etc]$ cat /etc/system-release
Amazon Linux AMI release 2018.03
Alternatively, you can build posgresql from source:
wget https://ftp.postgresql.org/pub/source/v11.5/postgresql-11.5.tar.gz
tar zxvf postgresql-11.5.tar.gz
cd postgresql-11.5
./configure --without-readline
make
make install
PostgreSQL 11 is not yet available from Amazon but PostgreSQL 10 is. I'm using Amazon Linux release 2 (Karoo) reported by cat /etc/system-release. To enable installation:
$ sudo amazon-linux-extras enable postgresql10
Once you enable this extra, you'll then see many packages for PostgreSQL 10 available through yum that can be installed normally:
$ yum list postgresql*
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Installed Packages
postgresql.x86_64 10.4-5.amzn2.0.2 #amzn2extra-postgresql10
postgresql-devel.x86_64 10.4-5.amzn2.0.2 #amzn2extra-postgresql10
postgresql-libs.x86_64 10.4-5.amzn2.0.2 #amzn2extra-postgresql10
Available Packages
postgresql-contrib.x86_64 10.4-5.amzn2.0.2 amzn2extra-postgresql10
postgresql-docs.x86_64 10.4-5.amzn2.0.2 amzn2extra-postgresql10
postgresql-libs.i686 10.4-5.amzn2.0.2 amzn2extra-postgresql10
postgresql-plperl.x86_64 10.4-5.amzn2.0.2 amzn2extra-postgresql10
postgresql-plpython.x86_64 10.4-5.amzn2.0.2 amzn2extra-postgresql10
postgresql-plpython3.x86_64 10.4-5.amzn2.0.2 amzn2extra-postgresql10
postgresql-pltcl.x86_64 10.4-5.amzn2.0.2 amzn2extra-postgresql10
postgresql-server.x86_64 10.4-5.amzn2.0.2 amzn2extra-postgresql10
postgresql-static.x86_64 10.4-5.amzn2.0.2 amzn2extra-postgresql10
postgresql-test.x86_64 10.4-5.amzn2.0.2 amzn2extra-postgresql10
postgresql-test-rpm-macros.x86_64 10.4-5.amzn2.0.2 amzn2extra-postgresql10
postgresql-upgrade.x86_64 10.4-5.amzn2.0.2 amzn2extra-postgresql10
postgresql-upgrade-devel.x86_64 10.4-5.amzn2.0.2 amzn2extra-postgresql10
I have the same problem with PostgreSQL 10 for a Django 2.1 project on AWS Elastic Beanstalk.
The issue was introduced last week around 17 Apr 2019 to make sure the operating system is an actual Red Hat release (which Amazon Linux is not). I found some details on the PostgreSQL mailing list:
"Amazon Linux support was removed years ago actually. I just made sure that our
repo file reflects that."
(BUG #15768: Removed rpms and now require /etc/redhat-release)
One poster on the mailing list suggested the following fix:
"We have temporarily mitigated the issue by using rpm and explicitly ignoring the repositories dependencies, but that seems like a band-aid fix for the real problem which is that dependency shouldn’t be there."
Personally, I've done the same as you, Scott, I've simply reverted to the PostgreSQL 9.6 client packages that AWS supplies directly. As long as Django and psycopg support that release, this works fine.
However, the long-term fix is for AWS to finally provide platforms with Amazon Linux 2...
Here is my maverick solution for the latest Amazon Linux 2 ami:
sudo su
cd /etc/yum.repos.d
nano pgdg.repo
Then I pasted this into the nano editor with its newly created pgdg.repo file:
[pgdg11]
name=PostgreSQL 11 $releasever - $basearch
baseurl=https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7.5-x86_64
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-11
Further commands are:
sed -i "s/rhel-\$releasever-\$basearch/rhel-7.5-x86_64/g" "/etc/yum.repos.d/pgdg.repo"
yum groupinstall "PostgreSQL Database Server 11 PGDG"
Create a new PostgreSQL database cluster:
/usr/pgsql-11/bin/postgresql-11-setup initdb
Now execute the following command to start and enable the postgresql services:
systemctl enable postgresql-11
systemctl start postgresql-11
Still, keep in mind the notes at this address:
Link to Postgresql.org

Windows 10 - vagrant plugin install vagrant-aws - The "libxml2" package isn't available. (RuntimeError)

Trying to install aws plugin for vagrant. Getting a dependency error.
Logs show...
find_executable: checking for xml2-config... -------------------- no
--------------------
"pkg-config --exists libxml2"
package configuration for libxml2 is not found
Console output:
C:\Users\jkittell\Documents\Schedule3> vagrant plugin install vagrant-aws
Installing the 'vagrant-aws' plugin. This can take a few minutes...
Building native extensions. This could take a while...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
ERROR: Failed to build gem native extension.
current directory: C:/Users/jkittell/.vagrant.d/gems/2.4.4/gems/ovirt-engine-sdk-4.2.4/ext/ovirtsdk4c
C:/HashiCorp/Vagrant/embedded/mingw64/bin/ruby.exe -r ./siteconf20181002-19764-xj4q7a.rb extconf.rb
checking for xml2-config... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/HashiCorp/Vagrant/embedded/mingw64/bin/$(RUBY_BASE_NAME)
--with-libxml2-config
--without-libxml2-config
--with-pkg-config
--without-pkg-config
extconf.rb:29:in `<main>': The "libxml2" package isn't available. (RuntimeError)
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/Users/jkittell/.vagrant.d/gems/2.4.4/extensions/x64-mingw32/2.4.0/ovirt-engine-sdk-4.2.4/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/Users/jkittell/.vagrant.d/gems/2.4.4/gems/ovirt-engine-sdk-4.2.4 for inspection.
Results logged to C:/Users/jkittell/.vagrant.d/gems/2.4.4/extensions/x64-mingw32/2.4.0/ovirt-engine-sdk-4.2.4/gem_make.out
PS C:\Users\jkittell\Documents\Schedule3>
I did a google search and found a hotfix for this.
Gem file available here.
Just do a vagrant plugin install ~/PATH/TO/vagrant-aws-0.8.0.gem
I had to install fog-aws plugin first and then it worked.
vagrant plugin install fog-aws
Console output:
PS C:\Users\jkittell\Documents\Schedule3> vagrant plugin install ..\..\Downloads\vagrant-aws-0.8.0.gem
Installing the '..\..\Downloads\vagrant-aws-0.8.0.gem' plugin. This can take a few minutes...
Fetching: iniparse-1.4.4.gem (100%)
Fetching: fog-core-2.1.2.gem (100%)
Fetching: fog-aws-3.3.0.gem (100%)
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
conflicting dependencies fog-aws (= 2.0.1) and fog-aws (~> 3.0)
Activated fog-aws-3.3.0
which does not match conflicting dependency (= 2.0.1)
Conflicting dependency chains:
vagrant-aws (= 0.8.0), 0.8.0 activated, depends on
fog-aws (~> 3.0), 3.3.0 activated
versus:
fog-aws (= 2.0.1)
PS C:\Users\jkittell\Documents\Schedule3> vagrant plugin install fog-aws
Installing the 'fog-aws' plugin. This can take a few minutes...
Successfully uninstalled dry-inflector-0.1.2
Successfully uninstalled fog-aliyun-0.3.2
Successfully uninstalled fog-atmos-0.1.0
Successfully uninstalled fog-aws-2.0.1
Successfully uninstalled fog-brightbox-0.16.1
Successfully uninstalled fog-cloudatcost-0.1.2
Successfully uninstalled fog-core-1.45.0
Successfully uninstalled fog-digitalocean-0.4.0
Removing console
Removing setup
Successfully uninstalled fog-dnsimple-1.0.0
Successfully uninstalled fog-dynect-0.0.3
Successfully uninstalled fog-ecloud-0.3.0
Successfully uninstalled fog-google-0.1.0
Successfully uninstalled fog-internet-archive-0.0.1
Successfully uninstalled fog-joyent-0.0.1
Successfully uninstalled fog-local-0.6.0
Successfully uninstalled fog-openstack-0.3.6
Successfully uninstalled xml-simple-1.1.5
Installed the plugin 'fog-aws (3.3.0)'!
PS C:\Users\jkittell\Documents\Schedule3> vagrant plugin install ..\..\Downloads\vagrant-aws-0.8.0.gem
Installing the '..\..\Downloads\vagrant-aws-0.8.0.gem' plugin. This can take a few minutes...
Installed the plugin 'vagrant-aws (0.8.0)'!
PS C:\Users\jkittell\Documents\Schedule3> vagrant plugin install vagrant-aws
Installing the 'vagrant-aws' plugin. This can take a few minutes...
Installed the plugin 'vagrant-aws (0.8.0)'!
PS C:\Users\jkittell\Documents\Schedule3>
Try using:
vagrant plugin install fog-aws
vagrant plugin update
vagrant plugin install vagrant-aws
This should upgrade fog to a version 3.5 or greater

installing laravel on EC2 - mbstring issue

I have installed Laravel 5.2 successfully on my Mac machine. But now I am walking through the procedures to install Laravel on AWS.
Once I got the instance running, I installed apache, php and mysql with the following command:
sudo yum install -y httpd24 php56 mysql55-server php56-mysqlnd
The php version is 5.6.17
I then did the following:
composer global require "laravel/installer"
and updated the path: export PATH=$PATH:~/.composer/vendor/bin
when I navigate to /var/www/html and do "laravel new ", the project gets created but I receive an mbstring extension problem. Below is a text dump of what I saw:
laravel new hws3
Crafting application...
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for laravel/framework v5.2.29 -> satisfiable by laravel/framework[v5.2.29].
- laravel/framework v5.2.29 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
I've scoured the internet and only found a solution for Windows. I am using Amazon Linux. Any guidance would be most appreciated.
It seems you have php 5.6 installed.
You need to install mbstring for that particular version of php.
Run sudo yum install php56-mbstring
credits: Alex Andrei answered here
If you want to install Laravel with composer, This is the right answer!
sudo su //to be root
yum install php56-mbstring