build keepalived rpm from its latest source - rpmbuild

I tried to build rpm from the latest keepalived (Version 2.0.7)
no issues during ./configure and make
But when executing
[root#localhost ~]# mkdir /root/rpmbuild
[root#localhost ~]# mkdir /root/rpmbuild/SOURCES/
[root#localhost ~]# mkdir /root/rpmbuild/SPECS
[root#localhost ~]# cp keepalived-2.0.7.tar.gz /root/rpmbuild/SOURCES/
[root#localhost ~]# cp keepalived-2.0.7/keepalived.spec /root/rpmbuild/SPECS
[root#localhost ~]# rpmbuild -ba /root/rpmbuild/SPECS/keepalived.spec
error: line 30: Unknown tag: #WITH_REGEX#BuildRequires: pcre2-devel
pcre2-devel and pcre2 also have installed.
How can I fix this?
Thank you
Luke.

Related

Nginx command not found, install ok

i have install Nginx with this command on Debian :
sudo apt install nginx
There is no error during the installation. but after when i want to use Nginx command :
nginx -v
-bash: nginx : commande introuvable
echo $PATH :/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
There is no file on /usr/local/sbin for Nginx
Try it with sudo
sudo nginx -V

Cannot install dotnet-sdk2.1 on Ubuntu 16.04 server

I was trying to install dotnet-sdk2.1.101 on my Ubuntu 16.04 server today but following error occured:
"dotnet-sdk-2.1.101 : Depends: aspnetcore-store-2.0.6 but it but it is not going to be installed"
Steps taken: (followed instructions on microsoft website):
wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-2.1
Any help is much appreciated :)
Following a guide on Upgrading to dotnet core 2.1.4 on Ubuntu 16.04 resolved this issue on my end:
First, Setup the package manager.
$ curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
$ sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
$ sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
$ sudo apt-get update
Next, Install .NET Core 2.x
$ sudo apt-get install dotnet-sdk-2.1.4
I have fixed my own issue following these below steps:
wget -q packages-microsoft-prod.deb https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update –y
sudo apt-get install dotnet-sdk-2.1.101
For me previous didn't help.
But for me worked the next:
wget http://ftp.us.debian.org/debian/pool/main/i/icu/libicu57_57.1-6+deb9u2_amd64.deb
sudo dpkg -i libicu57_57.1-6+deb9u2_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/i/icu/libicu60_60.2-6ubuntu1_amd64.deb
sudo dpkg -i libicu60_60.2-6ubuntu1_amd64.deb
sudo apt-get install dotnet-sdk-2.1
I don't quite understand did I need 2 versions of libicu, but after 1st it required the 2nd one.

Shiny server installation on REHL 7 AWS

I followed these commands to install R and Shiny server on REHL 7 AWS.
sudo yum update
yum install wget gcc pcre-devel libXt-devel cairo-devel pango-devel
pango libpng-devel curl-devel unixODBC-devel python-devel java-1.8.0-
openjdk-devel xz-devel
yum groupinstall "Development tools"
wget http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz
tar xzvf bzip2-1.0.6.tar.gz
cd bzip2-1.0.6
make -f Makefile-libbz2_so
make clean
make
make -n install
make install
cd ~
wget https://cran.r-project.org/src/base/R-3/R-3.3.2.tar.gz
tar -xzvf R-3.3.2.tar.gz
cd R-3.3.2
./configure --with-readline=no --with-x=no
make
make install
cp -r /usr/local/bin/R /usr/local/sbin/R
cp -r /usr/local/bin/Rscript /usr/local/sbin/Rscript
--Installing R packages
R
install.packages(c('shiny', 'rmarkdown', 'Cairo', 'png', 'rJava',
'RCurl'))
--Changing folder permissions
chmod 777 -R /usr/local/bin
chmod 777 -R /usr/local/sbin
chmod 777 -R /usr/local/lib64/R
chmod 777 -R /usr/local/lib64/R/library
chmod 777 /usr/local/lib64/R/etc/ldpaths
--shiny server installation
wget https://download3.rstudio.org/centos5.9/x86_64/shiny-server-
1.5.1.834-rh5-x86_64.rpm
sudo yum install --nogpgcheck shiny-server-1.5.1.834-rh5-x86_64.rpm
R CMD javareconf
chmod 777 /usr/local/lib64/R/etc/ldpaths
Everything ran fine with some warnings. But the shiny-server.service file is missing. When I try to execute
systemctl restart shiny-server
it says: Failed to restart shiny-server.service: Unit not found.
I also tried installing the newer version of R (3.4.1) and Shiny server(shiny-server-1.5.3.838-rh5-x86_64.rpm) but I am still getting the same error. This is the message I got when I installed shiny server:
/var/tmp/rpm-tmp.kIBODd: line 62: initctl: command not found
/var/tmp/rpm-tmp.kIBODd: line 65: initctl: command not found
Verifying : shiny-server-1.5.1.834-1.x86_64
1/1
Installed:
shiny-server.x86_64 0:1.5.1.834-1
Also I noticed that shiny-server.service is missing in /etc/systemd/system folder. Has anyone resolved this or knows how to resolve this?
I had the same problem.
As suggested in https://github.com/rstudio/shiny-server/issues/316,
entering these three lines manually solved it for me:
sudo cp /opt/shiny-server/config/systemd/shiny-server.service /etc/systemd/system/
sudo systemctl enable shiny-server
sudo systemctl restart shiny-server

How to reinstall nginx if I deleted /etc/nginx folder (Ubuntu 14.04)?

I'm trying to reinstall nginx, but I have this
nginx -t
nginx: [alert] could not open error log file: open()
"/var/log/nginx/error.log" failed (2: No such file or directory)
2015/01/25 16:18:01 [emerg] 1400#0: open() "/etc/nginx/nginx.conf"
failed (2: No such file or directory)
nginx: configuration file /etc/nginx/nginx.conf test failed
How to install and start nginx if I removed all the nginx folders?
Login as root or:
sudo su -
Then uninstall nginx:
apt-get purge nginx nginx-common nginx-full
And then install it:
apt-get install nginx
The other way is to run sudo command with -H:
sudo -H apt-get purge nginx nginx-common nginx-full
sudo -H apt-get install nginx
apt-get --purge remove nginx-*
apt-get install nginx
Try:
sudo aptitude purge nginx && sudo aptitude install nginx
This code will remove and reinstall Nginx

centos AWS shiny server wont resolve

Set up using AWS instance running centOS 6.4 with R and shiny server using my Macbook and trying to figure out what is wrong with it as there are issues with this process
# set up AWS Redhat 6.4 instance (dont forget to download .pem)
# set the .pem file into your ~/.ssh/ folder and make sure you chmod the file
chmod 400 ~/.ssh/myshinypemexample.pem
ssh into machine
ssh -i ~/.ssh/myshinypemexample.pem root#yourPublicDNS
# the first time you run this, just press yes, don't be scared :)
# use ec2-user and log into machine
ssh -i ~/.ssh/myshinypemexample.pem ec2-user#yourPublicDNS
Get the EPEL rpm
wget http://mirror.us.leaseweb.net/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm --test
Import the EPEL GPG key
wget https://www.fedoraproject.org/static/0608B895.txt
sudo mv 0608B895.txt /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Verify that the key has been imported.
rpm -qa gpg*
## You should see a line like this: gpg-pubkey-0608b895-4bd22942
Install the rpm
sudo rpm -ivh epel-release-6-8.noarch.rpm
Install shiny server
sudo su - -c "R -e \"install.packages('shiny', repos='http://cran.rstudio.com/')\""
# this gives error and have to install Rcpp and httr manually
wget http://cran.r-project.org/src/contrib/Rcpp_0.11.1.tar.gz
sudo R CMD INSTALL --build Rcpp_0.11.1.tar.gz
wget http://cran.r-project.org/src/contrib/httpuv_1.2.3.tar.gz
sudo R CMD INSTALL --build httpuv_1.2.3.tar.gz
run shiny server again
sudo su - -c "R -e \"install.packages('shiny', repos='http://cran.rstudio.com/')\""
Install Shiny Server
wget http://download3.rstudio.org/centos-5.9/x86_64/shiny-server-1.0.0.42-x86_64.rpm
sudo yum install --nogpgcheck shiny-server-1.0.0.42-x86_64.rpm
# test server
sudo status shiny-server
check location of example shiny app
sudo R -e "system.file('examples/01_hello', package='shiny')"
[1] "/usr/lib64/R/library/shiny/examples/01_hello"
#copy example file from R to /srv as Shiny looks for this location to work
sudo cp -R /usr/lib64/R/library/shiny/examples/01_hello /srv/shiny-server/
MYIP:3838 does not resolve. Why?

Resources