elaboration error: mongodb-database-tools - linux

i'm trying to install postgresql on my Linux Pc with sudo apt-get -y install postgresql
but the terminal give me that output (i'm sry but is italian):
so i've tryed to install that with sudo apt install mongodb-database-tools but the terminal give back the same error

Try this way for installation
To install PostgreSQL, first refresh your server’s local package index:
sudo apt update
Then, install the Postgres package along with a -contrib package that adds some additional utilities and functionality:
sudo apt install postgresql postgresql-contrib
To make sure it's installed enter this command in the terminal psql --version and it will should output something like this
psql (PostgreSQL) 14.1 (Ubuntu 14.1-2.pgdg20.04+1)

Related

how to install a latest version of Nodejs on Ubuntu?

I start using ubuntu (22.04.1) recently. I want to install nodejs latest version (currently v18.12.1 LTS).
But my node --version showing version v12.22.9.
First I install node using sudo apt-get install nodejs. Then I re-install my node but before re-install I update my system using sudo apt update && sudo apt upgrade. But i keep getting same result. node version v12.22.9.
1-Install CURL if you don't have:
sudo apt-get install curl
2-Run the following command to add the PPA to the Ubuntu system:
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - &&\
3-After successfully adding the PPA to the system, execute the command below to install Node on Ubuntu:
sudo apt-get install nodejs
4-check the version number of the installed software for node :
node -v
Don't use the distribution's default, Ubuntu is extremely conservative with bumping versions of things like Node, so instead go with Node's repository.
The current location is documented in the installer instructions:
curl -fsSL https://deb.nodesource.com/setup_19.x | sudo -E bash - &&\
sudo apt-get install -y nodejs
Where the setup_ scripts usually do a good job of getting everything properly sorted.
For the 18 LTS version:
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - &&\
sudo apt-get install -y nodejs
I would use nvm - Node Version Manager, see https://github.com/nvm-sh/nvm#install--update-script
This has a couple of advantages: you don't change the system's node version (which might be used elsewhere) and you may select a distinct (older or newer) version of node accompanied by appropriate installations of npm, yarn, a.s.o. It's simple to install "global" packages just locally (kind of oxymoron...) for your user. You don't need root permission for these.

How to Install Postgresql 11 in Amazon Linux AMI?

How do I install Postgresql 11 on Amazon Linux 2018.03 (specifically, not AMZ Linux 2) on Elastic Beanstalk?
I want to install a package and not manually build a binary. If an autoscale machine boots and has to build the entire PG binary, it'll take significantly longer on a t2/t3.micro.
I'm looking for pg_dump.
[Edit] Making more verbose, explain why building does not work for my situation.
The key was the PGDG is no longer available to Amazon Linux's yum since 9.3 so the individual pieces must be installed.
# Remove old Postgres
yum remove -y postgresql postgresql-server
# Install Postgres 11
yum install -y https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-6-x86_64/postgresql11-libs-11.4-1PGDG.rhel6.x86_64.rpm
yum install -y https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-6-x86_64/postgresql11-11.4-1PGDG.rhel6.x86_64.rpm
yum install -y https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-6-x86_64/postgresql11-server-11.4-1PGDG.rhel6.x86_64.rpm
[edit]
Replace the 11.4 in each link above with any version you need available at https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-6-x86_64/
sudo yum update
sudo amazon-linux-extras install postgresql11
Looks like there's no PostgreSQL 11 pre-built binary distribution for Amazon Linux. The way I solve it was to build from source code:
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
By default, it will install pg_dump into /usr/local/pgsql/bin/pg_dump.
This is an extended version of #nitsujri answer. I can't comment their comment, so I will create new answer here.
Install prerequisites:
sudo yum install readline-devel
sudo yum group install "Development Tools"
Download PostgreSQL source code and install the distro:
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
make
sudo make install
Add this line to your ~/.bashrc. After that relogin to an EC2 instance.
export PATH=/usr/local/pgsql/bin:$PATH

Unable to install libsasl2-devel on Amazon Linux 2 machine

I am running Ansible playbook and trying to install OS dependencies packages for python. I am trying to run the following:
sudo yum install gcc gcc-c++ libffi-devel python-devel python-pip python-wheel openssl-devel libsasl2-devel openldap-devel
However, it fails at installing libsasl2-devel with the message:
"No package matching 'libsasl2-devel' found available, installed or updated"
All my instances are Amazon Linux 2 machines. Is there any alternative package for this? I tried to look into this but I found solutions for Ubuntu only.
I was able to get it to work in a series of steps. Its a yum issue after other databases are installed and not cleaned up before installing mysql
clear sasl first: sudo yum remove cyrus-sasl
if you have installed maria, there will be conflicts, remove that as well
sudo yum remove mariadb mariadb-server mariadb-libs
take note of anything uninstalled by this to re-add later. If this is too much, you can take a risk and not remove sasl, but it might not reset the availability of the package.
Start here to clean up the dependency issues: https://serverfault.com/questions/873955/how-solve-mysql-5-7-dependency follow the command given by clean all as sudo rm -rf /var/cache/yum/*
This can possibly resolve your issues right there, if not continue the installation below.
delete all data left in /var/lib/mysql/ or you may have upgrade issues.
resinstall sasl:
sudo yum install cyrus-sasl cyrus-sasl-devel and any other packages removed above.
Establish mysql5.7 with the yum services.
wget https://dev.mysql.com/get/mysql57-community-release-el6-11.noarch.rpm
sudo yum localinstall -y mysql57-community-release-el6-11.noarch.rpm
sudo yum repolist enabled | grep "mysql.*-community.*"
sudo yum repolist enabled | grep mysql
sudo yum install -y mysql-community-common mysql-community-libs mysql-community-server mysql-community-client
if that doesn't work, re-clear the yum cache again and re-run sudo yum install -y mysql-community-server
if that works, then
sudo service mysqld start
IF the /var/lib/mysql is empty, it will have created a temporary password in the /var/log/mysqld.log (use sudo to read)
run sudo mysql_secure_installation and establish your real password and security settings.
now you should have access via mysql -u root -p

UBUNTU 14.04 - Rstudio - unable to install ggmap library

I'm trying to install ggmap library in my Rstudio but I get the following error:
ERROR: dependency ‘rjson’ is not available for package ‘ggmap’.
Is there any other way of installing it, I tried via menu Tools - Install packages or via console with command install.packages("ggmap").
How can I make it work?
Wild guess (for missing dependency):
sudo apt-get install r-base r-base-dev
sudo apt-get install r-cran-rjson
Filelist of r-cran-rjson package
or installation from Launchpad:
sudo add-apt-repository ppa:opencpu/rstudio
sudo apt-get update
sudo apt-get install rstudio-server
Please see this reference for details
first install rjson library using command prompt
install.packages("rjson",depend =TRUE)
Now install ggmap library
1.install.packages("rjson",depend =TRUE)
OR
2.Download and unzip
http://cran.r-project.org/web/packages/ggmap/index.html
If it doesn't work do
update.packages(repos="http://cran.revolutionanalytics.com")
Best Way is to open synaptic :
tap rjson
right-click ( select for installation )
apply
close synaptic
and in R session install.packages("ggmap")

VPS add repository error

I would like to install Bitcoind under (VPS) linu system. I got a step by step tutorial how can i do this installation, but everytime when i tried to add repository i got the following error message on console "sudo: add-apt-repository: command not found"
commands for installation
sudo aptitude install python-software-properties
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo aptitude update
sudo aptitude install bitcoind
mkdir ~/.bitcoin/
These commands are appropriate for an Ubuntu distribution and not CentOS.
The analogous commands that CentOS uses are yum install / yum update, etc.

Resources