How to install pam_mount on Centos 8 - linux

Previously, I installed pam_mount by command
sudo yum -q -y install cifs-utils pam_mount
But now i get
Error: Unable to find a match: pam_mount
Help, please, how i can install pam_mount to CentOS 8?

Adding the epel repo should resolve your issue:
yun install epel-release

Related

"g++: error: unrecognized command line option ‘-std=gnu++14’" with gcc version 9.3.0

I have the CentOS Linux release 7.9.2009 (Core) running in the VirtualBox, which was build by the Vagrant 2.2.19 and the Ansible 2.9.25 installed all the depedencies. On the machine there are installed:
gcc 9.3.0
python 3.6.8
node.js 16.13.1
npm 8.1.2
When the ansible executes the npm install I get errored with the g++: error: unrecognized command line option ‘-std=gnu++14’. I saw many questions here on the Stackoverflow, where the answers told me to upgrade the gcc to version >= 4.9. But I already have that and I'm still getting an error.
However, there is a workaround, which allows me to run the npm install:
sudo yum install -y centos-release-scl
sudo yum install -y devtoolset-9-gcc*
scl enable devtoolset-9 bash
npm install
but I have to run this manually, after I'm logged into the CentOS by the vagrant ssh. I'm not satisfied with this workaround because it is manual and the npm istall must be run programatically, hence it doesn't solve my problem.
I have tried to execute the npm install inside the scl from the ansible playbook.yml:
- name: Install centos-release-scl
shell: yum install -y centos-release-scl
become: yes
- name: Install devtoolset-9
shell: yum install -y devtoolset-9-gcc*
become: yes
- name: install packages based on package.json
shell: |
scl enable devtoolset-9 bash
npm install
become: yes
but it didn't work.
Is there a way how can I run the npm install programatically by the ansible without getting error?
You can stick with gcc 4.8.5 but downgrading to NodeJS 14 (as pointed out in https://github.com/systemd/node-sd-notify/issues/29#issuecomment-1040909033).
Note: You can download NodeJS 14 at https://github.com/nodesource/distributions/blob/master/README.md#enterprise-linux-based-distributions
For CentOS run this.
yum install gcc-c++
Then Install cmake.
yum install cmake
Then run.
yum install centos-release-scl
Install devtoolset.
yum install devtoolset-8-gcc devtoolset-8-gcc-c++
Enable devtoolset.
scl enable devtoolset-8 -- bash

Error unable to find the package name called v8-devel on RHEL8

I am trying to install v8-devel rpm package on RHEL 8.1 but unable to find it in all repositories of RHEL as well as in EPEL. I tried all the possibilities as shown below:
yum install v8-devel
yum install v8-devel
yum --enablerepo=* install v8*
yum search v8-devel
yum whatprovides v8-devel
dnf install v8-devel
dnf install v8-devel
dnf install v8*
i do have following EPEL for RHEL8 installed on my server.
epel
epel-modular
epel-source
I am also able to install similar package on RHEL 7 with the help of EPEL.
I am just curious to know whether name of (v8-devel) got changed for RHEL8 or not?
Can someone help me to find out v8-devel rpm and install it via EPEL on RHEL8.1.
Thanks in advance.
If we talk about R package the way is to run R shell and exec command:
> install.packages("v8")

How to reinstall the latest cmake version?

I would like to install cmake the latest version, on Linux environment. I have cmake version 3.5 installed and is not supported by some applications. I tried to upgrade it by uninstalling the current version. But when I reinstall with sudo apt-get install cmake, I get the same version 3.5 re-installed. How do I install the latest version with sudo apt-get install ....?
As far as I know the best way to get the latest CMake version installed on any Linux is not by apt but using pip.
Remove the apt cmake and install the latest version from pip which can easily keep up-to-date.
apt remove cmake -y
pip install cmake --upgrade
Edit: As GNUton has pointed out, the following only works on Ubuntu 16.04 and 18.04(Checked on June 2019).
Now CMake developer team in Kitware Inc provides APT repositiory. It allows you to install latest CMake via apt-get.
If you are using a minimal Ubuntu image or a Docker image, you may need to install the following packages:
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates gnupg \
software-properties-common wget
Obtain a copy of our signing key:
wget -qO - https://apt.kitware.com/keys/kitware-archive-latest.asc |
sudo apt-key add -
Add the repository to your sources list and update.
For Ubuntu Bionic Beaver (18.04):
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
sudo apt-get update
For Ubuntu Xenial Xerus (16.04):
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ xenial main'
sudo apt-get update
... Optional steps. See details in reference.
... Optional steps. See details in reference.
Now call
sudo apt-get install cmake
Reference: Kitware APT Repository.
You can try the following steps that have worked for me on Ubuntu 18.04.3 LTS as OS of the NVIDIA jetson Nano to get the last version of cmake "cmake-3.14.0" from https://cmake.org/download/.
Delete the installed version in your system
sudo apt purge cmake
Download cmake3.13.4 source
wget https://github.com/Kitware/CMake/releases/download/v3.13.4/cmake-3.13.4.tar.gz
Extract files
tar zxvf cmake-3.13.4.tar.gz
Execute the following commands in this order to build it
cd cmake-3.13.4
sudo ./bootstrap
sudo make
sudo make install
Verify the version is installed correctly
cmake --version
Following the comments made on how to Install the latest CMake version and to post the answer for this question:
Ans:
This depends with Ubuntu OS version currently installed on your PC or Mac. If you have the following Ubuntu OS version then you have this CMake installed or that you could install and reinstall with "sudo apt-get install cmake". Even if you uninstall your version and try to reinstall later version.
Ubuntu 16.04 ships with cmake-3.5.1
Ubuntu 17.10 ships with cmake-3.9.1
Ubuntu 18.04 ships with cmake-3.10.2
Ubuntu 20.04 ships with cmake-3.16.3
Ubuntu 21.04 ships with cmake-3.18.4
Now if you have Ubuntu 16.04 installed and you want cmake-3.10, there is OS problem since you can only install and reinstalled cmake-3.5.1. To get cmake-3.10 or any other version, you have to download and install the package from https://packages.ubuntu.com/. Once you find the latest version of cmake .targz files, you have to build it yourself from the command line.
For CentOS/RHEL you can help these following steps:
yum -y install python-pip
pip install cmake --upgrade
If you are using Google Colab like me and wanted a higher version of cmake in it. Then do the following,
!pip uninstall cmake
!pip install cmake
This will install cmake 3.22 instead of the default version 3.12
pip install cmake --upgrade
if the following occurs after cmake .. :
CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in
/.../.../...
CMake Error: Error executing cmake::LoadCache(). Aborting.
then try
hash -r
the following worked for me:
sudo apt remove cmake
pip install cmake --upgrade
then, I exited the terminal and again entered to check the version with cmake --version command
3.20.5 in ubuntu 16.04
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ xenial main'
sudo apt update
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys DE19EB17684BA42D
sudo apt install cmake cmake-qt-gui cmake-curses-gui
yum remove cmake
wget https://github.com/Kitware/CMake/releases/download/v3.13.4/cmake-3.13.4.tar.gz
tar zxvf cmake-3.13.4.tar.gz
cd cmake-3.13.4
sudo ./bootstrap --prefix=/usr/local
sudo make
sudo make install
vi ~/.bash_profile
...
# PATH=$PATH:$HOME/bin
PATH=/usr/local/bin:$PATH:$HOME/bin
export PATH
source ~/.bash_profile
cmake --version
vi ~/.bash_profile
centos7 it help me
In case someone still finds it hard to remove cmake from their machine.
This command works for me (requires sudo permissions):
$ sudo find / -name "cmake" | xargs -I % sudo rm -rf "%"

How to install Xvfb (X virtual framebuffer) on Redhat 6.5?

I have tried to install the Xvfb on red-hat 6.5 using
yum -y install xorg-x11-server-Xvfb
but it is not installed and it is giving msg that
No package xorg-x11-server-Xvfb available.
Error: Nothing to do
Plese help me to install Xvfb on Redhat 6.5 to remove the headless exception in the Applet.
Thanks.
The xorg-x11-server-Xvfb package is officially available from RedHat for RHEL 6 and RHEL 7 under the Optional channel (RHEL Workstation Optional, or RHEL Server Optional).
From the comments: To enable the optional repo: subscription-manager repos --enable rhel-7-server-optional-rpms and then you can install the package with yum install xorg-x11-server-Xvfb
I was able to download the RPM and then install it locally after reading this article
wget http://vault.centos.org/6.2/os/x86_64/Packages/xorg-x11-server-Xvfb-1.10.4-6.el6.x86_64.rpm
yum localinstall xorg-x11-server-Xvfb-1.10.4-6.el6.x86_64.rpm

Configure unable to find libgcrypt

hello i have faced problem with libgcrypt and i am sure is is installed with newst version thats happen when i try to install libssh2
[root#loft1034 libssh2-1.1]#./configure
configure: error: cannot find OpenSSL or Libgcrypt,
try --with-libssl-prefix=PATH or --with-libgcrypt-prefix=PATH
[root#loft1034 libssh2-1.1]# locate libgcrypt
/usr/lib/.libgcrypt.so.11.hmac
/usr/lib/libgcrypt.so.11
/usr/lib/libgcrypt.so.11.5.2
/usr/lib64/.libgcrypt.so.11.hmac
/usr/lib64/libgcrypt.so.11
/usr/lib64/libgcrypt.so.11.5.2
[root#loft1034 libssh2-1.1]#
i try to using prefix path with no benefit please help me?
Install the package with the header files.
CentOS 6/7, perhaps Fedora:
sudo yum install -y libgcrypt-devel
Debian/Ubuntu:
sudo apt-get install -y libgcrypt11-dev
Try this (it works for Ubuntu 15.10 64 bit)
wget ftp://ftp.debian.org/debian/pool/main/libg/libgcrypt11/libgcrypt11_1.5.0-5+deb7u3_amd64.deb
sudo dpkg -i libgcrypt11_1.5.0-5+deb7u3_amd64.deb
If you are using centOS install libcrypt-devel:
sudo yum install libgcrypt-devel
For ubuntu(works for me)
Try to download the package first, download links, note choose the right architecture.
there take amd64 as an example.first we get the link address http://security.ubuntu.com/ubuntu/pool/main/libg/libgcrypt20/libgcrypt11-dev_1.5.4-3+really1.8.1-4ubuntu1.3_amd64.deb
On ubuntu, we download the package
wget http://security.ubuntu.com/ubuntu/pool/main/libg/libgcrypt20/libgcrypt11-dev_1.5.4-3+really1.8.1-4ubuntu1.3_amd64.deb
then install it
sudo dpkg -i libgcrypt11-dev_1.5.4-3+really1.8.1-4ubuntu1.3_amd64.deb
Maybe there are other dependencies need to install.
you can choose to install it one by one, or follow the tips
sudo apt --fix-broken install

Resources