Installing (and deploying) Mono ASP.Net to Redhat - asp.net

I have an Asp.Net app (built in mono) that I am trying to deploy to a Linux Redhat 6 environment. I tried following the instructions on the mono website:
http://www.mono-project.com/docs/web/aspnet/
http://www.mono-project.com/docs/getting-started/install/linux/
I was able to get nginx installed and setup; however it appears I don't have fastcgi-mono-server4 installed. I've been googling all over the place trying to find how to install that on Redhat with no luck. I thought I'd try the apache instructions instead but I'm having no luck getting mod_mono installed. I tried to install mono-devel using yum but I keep getting the following errors:
Error: Package: libgdiplus0-3.12-1.x86_64 (download.mono-project.com_repo_centos_)
Requires: libpng15.so.15()(64bit)
Error: Package: libmonosgen-2_0-1-4.0.3.20-0.xamarin.4.x86_64 (download.mono-project.com_repo_centos_)
Requires: libc.so.6(GLIBC_2.15)(64bit)
Error: Package: libgdiplus0-3.12-1.x86_64 (download.mono-project.com_repo_centos_)
Requires: libtiff.so.5()(64bit)
Error: Package: mono-core-4.0.3.20-0.xamarin.4.x86_64 (download.mono-project.com_repo_centos_)
Requires: libc.so.6(GLIBC_2.16)(64bit)
Error: Package: libgdiplus0-3.12-1.x86_64 (download.mono-project.com_repo_centos_)
Requires: libtiff.so.5(LIBTIFF_4.0)(64bit)
Error: Package: mono-devel-4.0.3.20-0.xamarin.4.x86_64 (download.mono-project.com_repo_centos_)
Requires: libc.so.6(GLIBC_2.15)(64bit)
Error: Package: libgdiplus0-3.12-1.x86_64 (download.mono-project.com_repo_centos_)
Requires: libc.so.6(GLIBC_2.14)(64bit)
Error: Package: libgdiplus0-3.12-1.x86_64 (download.mono-project.com_repo_centos_)
Requires: libpng15.so.15(PNG15_0)(64bit)
I'm kind of at a loss here. Can anyone point me in the right direction to get mono installed on redhat and get my Asp.Net application properly deployed using either nginx or apache?

I had the same problem. I needed to reproduce the production environment (Fedora 17) and I was not able to install mono because of many references errors, similar to the issues mentioned in the question.
The only way to fix this was to download mono's source code and follow the steps he mentions.
I will copy-and-paste the procedure mentioned at: http://help.octopusdeploy.com/discussions/problems/39756-install-mono-on-centos-66
$ sudo yum -y install bison gettext glib2 freetype fontconfig libpng libpng-devel libX11 libX11-devel glib2-devel libexif glibc-devel urw-fonts java unzip gcc gcc-c++ automake autoconf libtool make bzip2 wget
$ cd /usr/local/src
$ sudo wget http://download.mono-project.com/sources/mono/mono-4.4.0.182.tar.bz2
$ sudo tar jxf mono-4.4.0.182.tar.bz2
$ cd mono-4.0.1
$ sudo ./configure --prefix=/opt/mono
$ sudo make
$ sudo make install
after everything is finished:
$ vi ~/.bashrc
add the following lines:
export PATH=$PATH:/opt/mono/bin
export PKG_CONFIG_PATH=/opt/mono/lib/pkgconfig
After that, I was able to correctly compile mono files on Fedora 17.
By the way, I used the latest version of Mono, found at:
http://download.mono-project.com/sources/mono/
Edit:
1) To see the effects of having mono on the path of a root terminal, close all terminal windows and log in again. The effects of changing ~/.bashrc are not seen immediately.
2) To be honest, I would like to be able to run mono from a non-root terminal. To achieve this, the idea is to edit ~/.bashrc from a non-root terminal. The process is the same as above but add "sudo" to edit the bash config for your (non-root) user.

It's been more than a month, if you are still looking for the answer, I found few links which seems to be useful.
http://help.octopusdeploy.com/discussions/problems/39756-install-mono-on-centos-66
http://www.linuxquestions.org/questions/linux-software-2/installing-mono-error-requires-libc-so-6-glibc_2-15-64bit-4175540534/
Even I facing the same problem, trying to fix this, will update if I manage to fix :)

I never did find a solution to this with Redhat 6. We ended up wiping the server and installing Redhat 7. From there, we were able to install and configure mono running on nginx and it works beautifully. I think the Redhat 6 repositories are just too far out of date to handle mono. I would recommend using Redhat 7+.

Related

RStudio Server (community) can't find libR.so even though it is in path

Note: I have filed this as an issue, but I'm not sure if it is really a bug or just something I need to resolve about my system configuration.
This seems to be a library that causes many people trouble with RStudio and RStudio Server. Often people can fix the problem by reinstalling the core R libraries with apt or manually copying or linking the libR.so file to a place where RStudio finds it.
In my case, I'm using a Conda instance for my R executable.
My instance was working and stopped after upgrading my ubuntu 22.04 VM. I tried some things to fix the problem but have not succeeded.
System details
RStudio Edition : Server
RStudio Version : 2022.07.2+576 (Spotted Wakerobin) for Ubuntu Bionic
OS Version : Ubuntu 22.04.1 LTS
R Version : 4.1.3 (2022-03-10) -- "One Push-Up"
Describe the problem in detail
I have a GCP VM running ubuntu 22.04 which I use for RSS.
I did a sudo apt update && sudo apt dist-upgrade and a restart. RSS stopped working. I ran sudo rstudio-server verify-installation and received
/usr/lib/rstudio-server/bin/rsession: error while loading shared libraries: libR.so: cannot open shared object file: No such file or directory
I decided to reinstall RSS using:
wget https://download2.rstudio.org/server/jammy/amd64/rstudio-server-2022.07.2-576-amd64.deb
sudo gdebi rstudio-server-2022.07.2-576-amd64.deb
and did not receive any errors during installation. However I received the same error as above with verify-installation. I then tried doing conda update --all -y. This also did not fix the problem.
Here is some useful information:
(base) balter#rstudio:~$ which R
/home/balter/conda/bin/R
(base) balter#rstudio:~$ head -n3 /etc/rstudio/rserver.conf
# Server Configuration File
rsession-which-r=/home/balter/conda/bin/R
(base) balter#rstudio:~$ find . -name "libR.so"
./conda/lib/R/lib/libR.so
./conda/pkgs/r-base-4.1.3-h7880091_3/lib/R/lib/libR.so
(base) balter#rstudio:~$ sudo rstudio-server verify-installation
TTY detected. Printing informational message about logging configuration. Logging configuration loaded from '/etc/rstudio/logging.conf'. Logging to '/var/log/rstudio/rstudio-server/rserver.log'.
/usr/lib/rstudio-server/bin/rsession: error while loading shared libraries: libR.so: cannot open shared object file: No such file or directory

Installing RStan using Rocker

I would like to be able to install the rstan package from binaries (without compiling from source). This blog post by Dirk Eddelbuettel has some clear instructions that should enable me to do exactly that. However I get the following error message when I try and install RStan. Here are the commands I used.
docker run --rm -ti rocker/r-ubuntu:18.04 bash
apt-get update; apt-get dist-upgrade -y
apt-get install -y r-cran-rstan
This produces the following error message.
Reading package lists... Done
Building dependency tree
Reading state information... Done
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-cran-rstan : Depends: r-cran-v8 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Installing the R tidyverse package using Dirk's instructions works fine. I am working on a Ubuntu OS within the Windows Subsystem for Linux (WSL-2).
These things can happen -- the best best is to then try
sudo apt install r-cran-v8
which reveals r-cran-node64 is required but not available.
I work much more with 20.04 than 18.04 so I don't what is going on here. I would recommend asking on the r-sig-debian list if anybody else has seen this.
PS And if you try 20.04 instead it works there.

php7.0-mcrypt can't install on ubuntu14.04

phpmyadmin show error [ The mcrypt extension is missing. Please check your PHP configuration.] on nginx. My PHP version is PHP 7.0.33-1+ubuntu14.04.1+deb.sury.org+1 (cli).
When I install php7.0-mcrypt, package doesn't exist.How to install php7.0-mcrypt?
As I understand from your message, you're using ubuntu 14.04. I recommend you upgrade your system. You could find this package in some latest reseases.
Or you could install this package manually wget http://cz.archive.ubuntu.com/ubuntu/pool/universe/p/php7.0/php7.0-mcrypt_7.0.33-0ubuntu0.16.04.4_amd64.deb && sudo dpkg -i php7.0-mcrypt_7.0.33-0ubuntu0.16.04.4_amd64.deb. But be careful, you could face some dependency hell and damage your OS.

nginx installed successfully but cannot start

I use homebrew to install nginx. However, when I start nginx, it prompts:
dyld: Library not loaded: /usr/local/lib/libpcre.1.dylib
Referenced from: /usr/local/bin/nginx
Reason: Incompatible library version: nginx requires version 4.0.0 or later, but libpcre.1.dylib provides version 2.0.0
Trace/BPT trap: 5
Any ideas?
I had this same problem, try running this:
brew unlink pcre && brew link pcre
In my case, this was the output:
Unlinking /usr/local/Cellar/pcre/8.35... 5 symlinks removed
Linking /usr/local/Cellar/pcre/8.35... 133 symlinks created
Well, I don't know what causes the problem. I checked my pcre, and it was in latest version. Without option I just uninstall it and reinstall it again...Then it works...
Only thing that fixed it for me was reinstalling everything in brew.
https://gist.github.com/nmccready/adfae27c498e0795767f
I run the following and it sorted the issue for me
brew update && brew upgrade && brew rm extempore && brew install extempore
If you get any problem in nginx then you can debug using this command:
nginx -t
after running this command you will get error message including filename and line number where the problem is

Installing R in cloudera's hadoop VM

Using cloudera's distro of hadoop for virtualbox, I first updated the epel:
sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86/epel-release-5-4.noarch.rpm
Which goes through just fine. But when I try
sudo yum install R
I get this:
Error: Package: R-core-2.15.2-1.e15.x86_64 (epel)
requires: libtcl8.4.so()(64bit)
Error: Package: R-core-2.15.2-1.e15.x86_64 (epel)
requires: libtk8.4.so() (64bit)
And the installation just quits. Is there any recommended steps from here? I get the same errors when trying to open the files from cran as well.
edit: I finally figured out the issue. Since I'm new to this kind of thing, I didn't realize the epel-release... file was out of date. If you're blindly following some guide like me and they haven't updated the epel release, you can check by going to http://dl.fedoraproject.org/pub/epel/6/x86_64/ and searching for epel-release. The most current version should be there.
By doing:
sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://download2.rstudio.org/rstudio-server-0.97.336-x86_64.rpm
sudo yum install --nogpgcheck rstudio-server-0.97.336-x86_64.rpm
That fixed the issue.

Resources