How to install cmake on Astra Linux 4.7?
Catherine Asks: How to install cmake on Astra Linux 4.7?
How to install cmake (also pbuilder, cowbuilder) on Astra Linux ? Details here:
user@baikal:~$ apt policy cmake N: Unable to locate package cmake user@baikal:~$ sudo astra-ce status [sudo] password for user: Sorry, try again. [sudo] password for user: CE репозиторий не подключен user@baikal:~$ sudo apt install cmake Reading package lists. Done Building dependency tree Reading state information. Done E: Unable to locate package cmake user@baikal:~$ cat /etc/os-release PRETTY_NAME="Astra Linux" NAME="Astra Linux" ID=astra ID_LIKE=debian ANSI_COLOR="1;31" HOME_URL="https://astralinux.ru" SUPPORT_URL="https://astralinux.ru/support" LOGO=astra VERSION_ID=4.7_arm VERSION_CODENAME=4.7_arm user@baikal:~$ uname -r 5.4.0-110-generic
SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.
Recent Threads
Why is it okay for my .bashrc or .zshrc to be writable by my normal user?
Zach Huxford Asks: Why is it okay for my .bashrc or .zshrc to be writable by my normal user?
My user ~/.zshrc file has the following default privileges
My understanding of user permissions is that any process spawned by my user will then have read/write permissions to this file.
In malicious hands this could probably be used to edit aliases or append a directory of the attackers choosing to the beginning of the $PATH. I’m concerned that a malicious program that I install on the user level could then trick me into somehow giving up my sudo password through this method.
Obviously I do trust most of the programs that I install to not be malicious, however, I do use npm as a package manager for my own projects which is commonly accepted to be a vector for malware due to the sheer number of dependencies each module and it’s dependencies can have.
I know that running sudo npm install -g is really bad practice but is using npm as a user which has write access to your main shell configuration file almost as bad just with a few extra steps in between, or am I lacking an understanding of how user permissions/shell configuration/npm works?
If this is insecure, then have I somehow missed security good practice for handling node js projects?
SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.
SFTP user login details real-time filtering
Amal P Ramesh Asks: SFTP user login details real-time filtering
I have enabled the SFTP login log into the default logfile /var/log/syslog and tried to filter the login time of each user and insert it into the database.
But the filtering is not worked as I expected.
Jun 23 15:47:03 ip-172-16-0-62 systemd[24938]: Reached target Shutdown. Jun 23 15:47:03 ip-172-16-0-62 systemd[24938]: Starting Exit the Session..c. Jun 23 15:47:03 ip-172-16-0-62 systemd[24938]: Received SIGRTMIN+24 from PID 24980 (kill). Jun 23 15:47:03 ip-172-16-0-62 systemd[1]: Stopped User Manager for UID 1051. Jun 23 15:47:03 ip-172-16-0-62 systemd[1]: Removed slice User Slice of nidasu. Jun 23 15:47:13 ip-172-16-0-62 systemd[1]: Created slice User Slice of ftpuser1. Jun 23 15:47:13 ip-172-16-0-62 systemd[1]: Starting User Manager for UID 1069. Jun 23 15:47:13 ip-172-16-0-62 systemd[1]: Started Session 11907571 of user ftpuser1. Jun 23 15:47:13 ip-172-16-0-62 systemd[24987]: Listening on REST API socket for snapd user session agent. Jun 23 15:47:13 ip-172-16-0-62 systemd[24987]: Reached target Paths. Jun 23 15:47:13 ip-172-16-0-62 systemd[24987]: Reached target Timers. Jun 23 15:47:13 ip-172-16-0-62 systemd[24987]: Reached target Sockets. Jun 23 15:47:13 ip-172-16-0-62 systemd[24987]: Reached target Basic System. Jun 23 15:47:13 ip-172-16-0-62 systemd[24987]: Reached target Default. Jun 23 15:47:13 ip-172-16-0-62 systemd[24987]: Startup finished in 15ms.
Needs to filter user login messages, like:
Jun 23 15:47:13 ip-172-16-0-62 systemd[1]: Started Session 11907571 of user ftpuser1.
I need to grep it out by matching the string «Started Session 11907571 of user ftpuser1 «
The session number 11907571 is a random number and usernames also differ so grepping can ignore the numbers and usernames, only need to check the string like: **»Started Session *** of user ***»
And need to parse the line and grep the date + time , and username then insert it into the MySQL database.
If there is any option to create a daemon process to run and insert the details into DB, it will help me to do the task.
SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.
get nat port forwarding IP address
gyandoo Asks: get nat port forwarding IP address
I am using an android phone that is connected to an openwrt router via usb tether
The android phone has a dynamic wan gateway on each reboot
To make things easy for me to connect to the webui of some of the apps on the android phone via the openwrt router, I created a port forwarding rule in openwrt and entered the wan ip of the android phone manually. port forwarding rule
On each reboot of the android phone, i will have to check the routes in openwrt, get the new wan ip and update the port forwarding rule, which is fine
to make things easier on my linux machine, id like to be able to use CLI to get that wan ip that i set in port forwarding i.e 192.168.1.1:32399
not that it matters, but curlftpfs ftp mounting isn’t playing well with nat, all other android app webui’s are working fine with the port redirect, curlftpfs requires the wan ip, it finds the wan ip in debug but skips it
SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.
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 .
I would like to preserve its install directory without having to build it with make install or anything manually. Is it possible to sudo apt-get latestversion.
@123 sudo apt-get . might not be checking for cmake latest versions or anything current with this application.
Ubuntu 16.04 : cmake-3.5.1 . Ubuntu 17.10 : cmake-3.9.1 . Ubuntu 18.04 : cmake-3.10.2 packages.ubuntu.com/search?keywords=cmake&searchon=names . Later versions is a «build it yourself» job.
@Knud Larsen That makes sense, but does it mean I have to install Ubuntu17.10 to get the latest cmake version? it might take longer that just installing cmake.
11 Answers 11
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
Thanks for the info, However I was interested in knowing why sudo «apt» does not work on cmake and if this problem or error arise from cmake or apt, becoz that is not the case with other applications. That works fine with «sudo apt». Anyway I will try «pip» as my option.
I used this to install cmake 3.13.3 on Ubuntu 18.04, but it didn’t work out of the box: «$ cmake .. CMake Error: Could not find CMAKE_ROOT . CMake has most likely not been installed correctly. Modules directory not found in /home/etienne/.local/share/cmake-3.12 CMake Error: Error executing cmake::LoadCache(). Aborting.»
After that one must run sudo ln /usr/local/bin/cmake /usr/bin/cmake to create link to cmake executable
It didn’t work. After re installation gave me :bash: /usr/bin/cmake: No such file or directory. I think this is not the perfect solution.
Edit: As GNUton has pointed out, the following only works on Ubuntu. It supports 18.04, 20.04 and 22.04(Checked on March 2023).
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 gpg wget
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
For Ubuntu Jammy Jellyfish (22.04):
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
For Ubuntu Focal Fossa (20.04):
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
For Ubuntu Bionic Beaver (18.04):
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
- Install the kitware-archive-keyring package to ensure that your keyring stays up to date as Kitware rotate the keys:
sudo rm /usr/share/keyrings/kitware-archive-keyring.gpg sudo apt-get install kitware-archive-keyring
- Optional steps for subscription on release candidates. See details in reference.
- Now call
sudo apt-get update sudo apt-get install cmake
I tried it and it work. Onces I saw «Unpacking cmake (3.14.5-0kitware1) over (3.5.1-1ubuntu3) . «. so. Yes, You can now install the Latest cmake on any Ubuntu version, because I am running xenial and I have CMAKE 3.14.5. Indeed, this does avoid the build process if you can follow the guide provided, Thanks a lot!
Follow the updated instructions on Kitware’s website. Otherwise you’ll get a warning message: Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
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
Download cmake3.13.4 source
wget https://github.com/Kitware/CMake/releases/download/v3.13.4/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
Following the comments made on how to Install the latest CMake version and to post the answer for this question:
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