More

Installing QGIS on Ubuntu 14.04?

Installing QGIS on Ubuntu 14.04?


Following the QGIS installation guide I have tried both UbuntuGIS and QGIS stable, but both fail with the error message:

The following packages have unmet dependencies:

python-qgis : Depends: python-qgis-common (= 2.6.1.1+trusty1) but it is not going to be installed

Depends: libqgispython2.6.1 but it is not going to be installed Depends: libqgis-analysis2.6.1 but it is not going to be installed Depends: libqgis-core2.6.1 but it is not going to be installed Depends: libqgis-gui2.6.1 but it is not going to be installed Depends: libqgis-networkanalysis2.6.1 but it is not going to be installed

qgis : Depends: libgdal1h (>= 1.8.0) but it is not going to be installed

Depends: libqgis-analysis2.6.1 but it is not going to be installed Depends: libqgis-core2.6.1 but it is not going to be installed Depends: libqgis-gui2.6.1 but it is not going to be installed Depends: libqgis-networkanalysis2.6.1 but it is not going to be installed Depends: qgis-providers (= 2.6.1.1+trusty1) but it is not going to be installed Recommends: qgis-plugin-grass but it is not going to be installed Recommends: qgis-plugin-globe but it is not going to be installed

E: Unable to correct problems, you have held broken packages.


I had QGISv.2.4 running on my machine with Ubuntu 12.04. After upgrading to Ubuntu 14.04 I was getting error message that pyqgis could not be loaded.

So I uninstalled QGIS using the Ubuntu Software Center and also run

sudo apt-get purge qgis

After that I tried to install the latest version of QGIS Debian Stable and UbuntuGIS unstable but getting the error messages described above.

The weird thing is that neither Ubuntu Software Center nor apt-get list have QGIS listed as installed, but if I run a search for qgis on my file system qgis and all its dependencies are still there. That's why I getting told to have broken packages.


I guess your problem is ratherHow to remove an old version of QGIS completely before re-installing. Mixing ubuntugis and qgis debian packages might lead to unexpected behaviour.

On updating from QGIS 2.6.0 to 2.6.1 I noticed that some ubuntugis packages (qgis, python-qgis and one other) were not upgraded, but manually forcing the install did the trick.


I actually had removed qgis (withsudo apt-get autoremove qgisandsudo apt-get --purge remove qgis) to get a fresh install… but I still got your error message

what helped me was:

  1. adding the qgis debian sources back to /etc/apt/sources.list (they where commented due to the ubuntu upgrade)
  2. adding the keys to be able to update:gpg --keyserver keyserver.ubuntu.com --recv DD45F6C3 gpg --export --armor DD45F6C3 | sudo apt-key add -
  3. sudo apt-get update
  4. enforced update of libqgis-customwidgets withsudo apt-get upgrade libqgis-customwidgets
  5. install of QGIS:sudo apt-get install qgis python-qgis

I had to deal with this same problem today. QGis was removed from the system becauselibgdal1hwas marking conflicting dependencies.

I found out these conflicts were coming from the QGis PPA itself. I removed it from mysources.listand then created a reference to the UbuntuGis-Unstable PPA. After that was just a matter of running:

sudo apt update && sudo apt install qgis


I think there's a problem with some of their repositories, causing this. What worked for me is the following:

1. Disable all PPAs

This answer explains in detail how under the title "Disable/Remove/Purge PPAs". I disabled all of them, not only the ones associated with QGIS, for good measure.

2. Remove current QGIS

in terminal, run

sudo apt-get update sudo apt-get purge qgis sudo apt-get autoremove sudo apt-get clean sudo apt-get autoclean

3. Install new QGIS

at this point to install the default version of QGIS from the Ubuntu repository, run in the terminalsudo apt-get update && sudo apt-get install qgis

This worked for me, but installed QGIS 2.0 Dufour (and also had some minor exceptions starting up). I wanted a newer version. To pick the right repository for your desired version and add it, see the this page on the qgis.org website (instructions how to add the repository are there, scroll down). I wanted the latest one, 2.18 Las Palmas, and so I chose the repository http://qgis.org/debian. For me, it was adding the linedeb http://qgis.org/debian trusty mainin the same place in the Software Center through which I disabled the PPAs. Then in the terminalsudo apt-get update && sudo apt-get install qgis


How to install ia32-libs in Ubuntu 14.04 LTS (Trusty Tahr)

I installed Ubuntu 14.04 (Trusty Tahr) yesterday. Everything seems OK. But when I tried to compile some C code, I encounter the following error. The error seems to be due to the OS lacking the 32-bit architecture support. The error output is as following:

I used to apt-get install ia32-libs when I was using Ubuntu 12.04 (Precise Pangolin). But what I know is that Ubuntu has removed the ia32-libs since Ubuntu 13.10 (Saucy Salamander). How can I fix this problem?


The PPA repository does not contain any packages for mysql 5.7: There are no deb files. Just take a look with your browser:

And on the status page it actually says:

So at least for this ppa you are out of luck -(

Therefore I also suggest also using the original source at mysql/Oracle:

  • See Mohit's answer for the short version.
  • For the long version: https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/
  • Note that there is a more recent version of the config deb. Install that one: dpkg -i mysql-apt-config_0.6.0-1_all.deb
  • The site might ask you to sign on or register. It's Oracle after all.

Then the this version should show up (5.7 is GA since 5.7.9 so 5.7.10 should be fine):

Note that you might have to clean up other dependent packages beforehand.


If you can't upgrade because it's read-only then start by looking at dmesg do see what that says. It'll probably be the system BIOS or the RAID controller BIOS thats marking it read only.

If it's installed, but you cannot write to the disk after booting, then check if the filesystems are mounted as readonly with the command "mount".

If it's readonly then you may need to run a fsck on the filesystem, or maybe just remount it rw.

I've seen this when using disks that Linux for some reason think is faulty.
Did you reformat the entire disk when installing?

We ended up downloading a newer version of Ubuntu and installed without any problems. For whatever reason the version of Fiesty Fawn we had just kept croaking.


To install PostgreSQL on Ubuntu 14.04 server:

Create a database and a user to access it

Test connecting to PostgreSQL

PostgreSQL will ask you for your password. Then you should see something like this:

Add PostGIS support to the database

Enabling remote access over the internet

Add the following line to /etc/postgresql/9.3/main/postgresql.conf

On the file /etc/postgresql/9.3/main/pg_hba.conf in section "IPv4 local connections" replace the following line:

Then restart PostgreSQL server:

Next, open pgAdmin3 and create a new connection using these settings:

With the same settings, you will be able to connect using QGIS.

Obs: If you have done something wrong and want to purge and reinstall all PostgreSQL files to create a brand new installation, here are the steps:

To remove everything PostgreSQL from your system:

Just purging the postgres package isn't enough since it's just an empty meta-package.


Schroot

This section is a guide to installing a Debian-like distribution “inside” another Linux distribution. It is worded in terms of installing a 32-bit Ubuntu inside a 64-bit Ubuntu, but should apply with minor modifications to other situations, such as installing Debian unstable inside Debian stable or vice versa.

Introduction

The idea is to install an alternate distribution in a subtree and run from that. You can install a 32-bit system on a 64-bit system that way, or a different release of your distribution, or a testing environment with different sets of packages installed.

The chroot command and system call starts a process with a view of the filesystem that's restricted to a subtree of the directory tree. Debian and Ubuntu ship schroot, a utility that wraps around this feature to create a more usable sub-environment.

Install the schroot package /> (Debian) and the debootstrap package /> (Debian). Debootstrap is only needed for the installation of the alternate distribution and can be removed afterwards.

Set up schroot

This example describes how to set up a 32-bit Ubuntu 10.04LTS (lucid lynx) alternate environment. A similar setup should work with other releases of Debian and Ubuntu. Create a file /etc/schroot/chroot.d/lucid32 with the following contents:

The line directory=/32 tells schroot where we'll put the files of the 32-bit installation. The line username=yourusername says the user yourusername will be allowed to use the schroot. The line groups=users,admin says that users in either group will be allowed to use the schroot you can also put a users=… directive.

Install the new distribution

Create the directory and start populating it with debootstrap. Debootstrap downloads and installs a core set of packages for the specified distribution and architecture.

You almost have a working system already what follows is minor enhancements. Schroot automatically overwrites several files in /32/etc when you run it, in particular the DNS configuration in /etc/resolv.conf and the user database in /etc/passwd and other files (this can be overridden, see the documentation). There are a few more files you may want to copy manually once and for all:

There won't be a file /etc/mtab or /etc/fstab in the chroot. I don't recommend using the mount command manually in the chroot, do it from outside. But do create a good-enough /etc/mtab to make commands such as df work reasonably.

With the directory type, schroot will perform bind mounts of a number of directories, i.e. those directories will be shared with the parent installation: /proc , /dev , /home , /tmp .

Services in the chroot

As described here, a schroot is not suitable for running daemons. Programs in the schroot will be killed when you exit the schroot. Use a “plain” schroot instead of a “directory” schroot if you want it to be more permanent, and set up permanent bind mounts in /etc/fstab on the parent installation.

On Debian and Ubuntu, services start automatically on installation. To avoid this (which could disrupt the services running outside the chroot, in particular because network ports are shared), establish a policy of not running services in the chroot. Put the following script as /32/usr/sbin/policy-rc.d and make it executable ( chmod a+rx /32/usr/sbin/policy-rc.d ).

Populate the new system

Now we can start using the chroot. You'll want to install a few more packages at this point.

You may need to generate a few locales, e.g.

If the schroot is for an older release of Ubuntu such as 8.04 (hardy), note that the package ubuntu-standard pulls in an MTA. Select nullmailer instead of the default postfix (you may want your chroot to send mail but you definitely don't want it to receive any).

Going further

For more information, see the schroot manual, the schroot FAQ and the schroot.conf manual. Schroot is part of the Debian autobuilder (buildd) project. There may be additional useful tips on the Ubuntu community page about debootstrap.


this must work with any version:

For MX Linux its:

Also in MX linux, you can open the MX Package Installer and search for 'cpupower' under the Full App Catalog

For Zorin 15.2 its:

You can also go to Synaptic and search for linux-tools-common. You can also search for linux-tools- and the output of uname-r. ex. linux-tools-5.3.0-42-generic


this is what you need for ubuntu-18.x cosmic:
first you have to tell ubuntu a new package source
- $sudo add-apt-repository "deb https://qgis.org/debian cosmic main"
- $sudo add-apt-repository "deb-src https://qgis.org/debian cosmic main"

then add the right pgp key
- $wget -O - https://qgis.org/downloads/qgis-2017.gpg.key | gpg --import
- $gpg --fingerprint CAEB3DC3BDF7FB45
- $gpg --export --armor CAEB3DC3BDF7FB45 | sudo apt-key add -

if everything is ok you can install QGis
- $sudo apt-get update && sudo apt-get install qgis python-qgis qgis-plugin-grass


A lot of frequently used *TeX packages have been combined into Ubuntu packages. In this case a quick search in the Ubuntu Package Manager shows that xlop is part of the texlive-generic-extra package, which you can install using apt-get install or the GUI as preferred.

Having said that, it's not particularly difficult to install *TeX packages manually once you've identified the right tree to put them in (CTAN has pre-zipped versions of a lot of packages, which makes it even easier - you just have to unzip them at the right place and run texhash ), and you then have the advantage of being sure you're up-to-date. At the moment I believe the Ubuntu versions are lagging quite a way behind TeX Live releases (let alone any subsequent package updates).


5 Answers 5

Try the following commands, one after another. If you progress, respective folders may already be deleted:

sudo apt-get purge texlive*

sudo rm -rf /usr/local/texlive/* and rm -rf

sudo rm -rf /usr/local/share/texmf

sudo apt-get remove tex-common --purge

find -L /usr/local/bin/ -lname /usr/local/texlive/*/bin/* | xargs -r rm

This finds all the files in /usr/local/bin which point to a location within /usr/local/texlive/*/bin/* and removes them because we’ve already deleted all of /usr/local/texlive , these are dead links. To see which files are being deleted, replace xargs rm with xargs -t rm (or tee off to a log file, or whatever).

Update

In case that - after the last command (8.) - your terminal returns something like this

if you know what you're doing, you can add sudo between the pipe and xargs rm , so that it becomes

or, to be more careful and also more thorough, follow the steps of this answer, which worked for me.

Update 2

Refer to this answer to solve the issue of rm: missing operand when running (8.)