install Salome-Meca - Code_Aster in Linux Mint 20.2 requires a successful "sudo apt install build-essential" [duplicate] - linux-mint

This question already exists:
Windows 11, WSL with Ubuntu 20.04.3 LTS: cannot perform "sudo apt install build-essential" because of missing dependencies [closed]
Closed 1 year ago.
I need to install Salome-Meca - Code_Aster on a Linux Mint 20.2 machine. This software requires a series of extra modules (see https://www.code-aster.org/V2/spip.php?article303).
When typing on the terminal:
sudo apt update
sudo apt upgrade
sudo apt install build-essential
I always get the following message after the third command line instruction:
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:
build-essential : Depends: libc6-dev but it is not going to be installed or
libc-dev
Depends: g++ (>= 4:9.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
How can I overcome this? I have read elsewhere that the solution is to "downgrade". Downgrade what? And how?

Related

Dependency issues while installing postgresql-10-postgis-2.5 on Ubuntu Xenial (16.04)

There are some dependency problems while installing postgresql-10-postgis-2.5 on Ubuntu Xenial (16.04) after 2.5.3 version (which is published to PostgreSQL Apt Repo a couple days ago). The reason is that now postgresql-10-postgis-2.5 (version 2.5.3+dfsg-2.pgdg16.04+1) requires libgeos-c1v5 (>= 3.7.0) but the latest version of libgeos-c1v5 is 3.5.0-1ubuntu2 for Ubuntu Xenial (https://packages.ubuntu.com/search?keywords=libgeos-c1v5). I can upgrade to bionic (18.04 LTS) but the same problem exists since it brings version 3.6.2. 19.04 is not an option for me at the moment.
Is there a way to install libgeos-c1v5 >= 3.7.0 or install postgresql-10-postgis-2.5 2.5.2 on Ubuntu Xenial (16.04) using apt?
The steps to reproduce it locally on a Docker container:
docker run -it ubuntu:xenial /bin/bash
apt update
apt install -y curl
echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" > /etc/apt/sources.list.d/pgdg.list
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
apt update
apt install postgresql-10-postgis-2.5 postgresql-10-postgis-2.5-scripts
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:
postgresql-10-postgis-2.5 : Depends: libgeos-c1v5 (>= 3.7.0) but 3.5.0-1ubuntu2 is to be installed
E: Unable to correct problems, you have held broken packages.
We faced similar issue with Ubuntu 18 when trying to install postgresql-9.6-postgis-2.5. We had to install the experimental version 3.7 to get it working.
libgeos-3.7.0_3.7.0-1_bionic0_amd64
libgeos-c1v5_3.7.0-1_bionic0_amd64.deb
https://launchpad.net/~ubuntugis/+archive/ubuntu/ubuntugis-experimental/+build/15675841
However, I'm not sure if you can get this for xenial.
Hope this helps, thanks.
Update:
We now have the updated version of libgeos in bionic repo, hope the updated version was released for xenial as well, thanks.
apt search libgeos-3.7
Sorting... Done
Full Text Search... Done
libgeos-3.7.1/bionic-pgdg 3.7.1-1~pgdg18.04+1 amd64
Geometry engine for Geographic Information Systems - C++ Library
libgeos-3.7.1-dbgsym/bionic-pgdg 3.7.1-1~pgdg18.04+1 amd64
debug symbols for libgeos-3.7.1

How to install VSCODE on debian 9? Nothing works

I'm trying to install Visual studio code.
My Raspb. Version is:
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 9.8 (stretch)
Release: 9.8
Codename: stretch
I tried several method (starting to download .deb and using dpkg or install command) but nothing worked.
How can I fix this problem? I really need VSC because my project is growing and Geany messes up.
Downloaded .deb and .tar files from the official site, followed the setup instruction but I got this error
With dpkg (both 32 and 64bit):
"package architecture (amd64) does not match system (armhf)"
"package architecture (i386) does not match system (armhf)"
With sudo install:
sudo apt install ./code_1.33.1-1554971066_amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'code:amd64' instead of './code_1.33.1-1554971066_amd64.deb'
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:
code:amd64 : Depends: libnotify4:amd64 but it is not installable
Depends: libnss3:amd64 (>= 2:3.26) but it is not installable
Depends: apt:amd64 but it is not installable
Depends: libxkbfile1:amd64 but it is not installable
Depends: libsecret-1-0:amd64 but it is not installable
Depends: libgtk-3-0:amd64 (>= 3.10.0) but it is not installable
Depends: libxss1:amd64 but it is not installable
E: Unable to correct problems, you have held broken packages.
With repository:
pi#raspberrypi:~/Downloads $ sudo apt-get update
Err:1 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Temporary failure resolving 'raspbian.raspberrypi.org'
Err:2 http://archive.raspberrypi.org/debian stretch InRelease
Temporary failure resolving 'archive.raspberrypi.org'
Err:3 https://packages.microsoft.com/repos/vscode stable InRelease
Could not resolve host: packages.microsoft.com
Reading package lists... Done
W: Failed to fetch http://raspbian.raspberrypi.org/raspbian/dists/stretch/InRelease Temporary failure resolving 'raspbian.raspberrypi.org'
W: Failed to fetch http://archive.raspberrypi.org/debian/dists/stretch/InRelease Temporary failure resolving 'archive.raspberrypi.org'
W: Failed to fetch https://packages.microsoft.com/repos/vscode/dists/stable/InRelease Could not resolve host: packages.microsoft.com
W: Some index files failed to download. They have been ignored, or old ones used instead.
pi#raspberrypi:~/Downloads $ sudo apt-get install code
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package code
I'm getting mad about this problem, I tried older repository but they don't work.
There are Community builds of Visual Studio Code available (for Raspberry Pi and other ARM and Intel systems).
The packages are currently available in DEB and RPM format. You can use the scripts provided here to install the packages and add their repository to your system or install it manually.
Below I summarized the steps:
Open a new terminal. If you need super-user rights (you probably do), then you can enter sudo -s and press return to enter a super-user session. Run the installer for your current distribution:
APT instructions
(including Debian, Raspbian, Ubuntu and Linux Mint)
. <( wget -O - https://code.headmelted.com/installers/apt.sh )
Press the return key. Once the installer has completed, you should have a "Code - OSS" entry in your desktop program list.
Manual installation
If for any reason the script above will not work on your system, or you do not want to add the package source for updates, you can get the latest version of the package for your system below.
Public GPG key
For either APT or YUM installation, you'll want the public GPG key to verify the package, which you can download here.
APT and YUM packages
The latest packages are available directly from the PackageCloud releases page.
The specific package you need is available here.
EDIT:
At this time (29.04.2019) the current release (v. 1.32) appears not to be working for everybody. See: issue#64. Seems that you'll have to go back to v. 1.29, which is reported to be running fine.
You can choose this package and install it manually, or use APT. If you decide to install it via APT, note that you'll have to mark the package on hold as described below.
To prevent code-oss from upgrading (so that you can keep v. 1.29 until the issue is fixed) follow these instructions:
Install v. 1.29 via APT:
apt-get install code-oss=1.29.0-1539702286
Then mark it on hold by running:
apt-mark hold code-oss
Now running apt-get upgrade won't try to bump it up until you run:
apt-mark unhold code-oss
This will allow it to upgrade again as usual.

How to install postgis for postgresql 9.6

I want to install Postgres 9.X and Postgis for it.
I manage to install Postgres with version 9.6 with this command:
sudo apt-get install postgresql-9.6
But then when I type:
sudo apt get install postgis
I suddenly get postgres 10 and postgis for that version.
When I try something like on this link http://technobytz.com/install-postgis-postgresql-9-3-ubuntu.html my installation failed, I get this code in terminal:
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:
postgresql-9.3-postgis-2.1 : Depends: libgdal1 (>= 1.9.0) but it is not going to be installed
Depends: libgeos-c1 (>= 3.3.3) but it is not going to be installed
Depends: liblwgeom-2.1.8 (>= 2.1.6) but it is not going to be installed
Depends: libproj0 but it is not installable
Recommends: postgresql-contrib-9.3 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I am using Ubuntu 18.04
On ubuntu, you can use following commands:
sudo apt-get install postgresql-<xx>-postgis-<yy> postgresql-<xx>-postgis-<yy>-scripts
e.g
sudo apt-get install postgresql-9.6-postgis-2.4 postgresql-9.6-postgis-2.4-scripts
Just choose the proper version you need.

Cannot install latest Mongdb

My production Mongo database was hacked and all databases deleted. I now want to upgrade to the latest version of Mongo but am having extraordinary problems. Im on Linux Mint 17.1. Im following instructions here:
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
When I run:
sudo apt-get install -y mongodb-org
I end up with error:
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:
mongodb-org : Depends: mongodb-org-shell but it is not going to be installed
Depends: mongodb-org-server but it is not going to be installed
Depends: mongodb-org-mongos but it is not going to be installed
Depends: mongodb-org-tools but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
What can I try next? As I said, my app is down since the hack and now I cannot even install Mongo...
Try sudo apt-get install -f to fix packages.
If that doesn't work, figure out if you need all 4 packages, mongodb-org-server might be the only one you really need.
In this case you can try running the following command with a specific version (3.0.15 in my case):
sudo apt-get install -y --force-yes mongodb-org=3.0.15 mongodb-org-server=3.0.15 mongodb-org-shell=3.0.15 mongodb-org-mongos=3.0.15 mongodb-org-tools=3.0.15

How to install postgresql on Ubuntu 16.04 VM despite "unmet dependencies" to set up Ruby on Rails project

Ubuntu 16.04 on VirtualBox VM using Vagrant.
Windows 10 host.
Git Bash terminal.
Connected to vagrant up, vagrant ssh.
I have a fresh VM and have installed ruby and rails. I am trying to install postgresql to use for a Ruby on Rails project, but I get the following error:
vagrant#vagrant-ubuntu-trusty-64:~$ sudo apt-get install postgresql postgresql-contrib
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:
postgresql : Depends: postgresql-9.6 but it is not going to be installed
postgresql-contrib : Depends: postgresql-contrib-9.6 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I've tried various things, and nothing seems to let me install postgres
I was facing same problem in my ubuntu 16.04
but i fixed that problem and it's very simple just follow these step and you will be able to install postgresql 10 in your system :
Add this to your sources.list:
sudo vim /etc/apt/sources.list
deb http://ftp.de.debian.org/debian/ wheezy main non-free contrib
deb-src http://ftp.de.debian.org/debian/ wheezy main non-free contrib
after that add these link to your pgdg.list file if it's not there you have to create and add link and save it.
sudo vim /etc/apt/sources.list.d/pgdg.list
deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main
deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main
then update your system
sudo apt-get update
sudo apt-get upgrade
and install that unmet dependencies :
apt-get install ssl-cert
that's it. now Install postgresql using these command
sudo apt-get install postgresql-10
#JosMac pointed out that I am running Ubuntu 14.04 instead of 16.04 as I had thought.
I was still running into similar errors, but I just ended up installing the rails-dev-box (https://github.com/rails/rails-dev-box) way which uses yakkety64, and seems to work.