How to uninstall cabal, cabal-nirvana and yesod - uninstallation

I am trying to find a way to remove cabal/cabal-nirvana/yesod from my system, I did install cabal with
sudo apt-get install cabal-install
second I would like to remove cabal-nirvana which I installed with
cabal install cabal-nirvana
and finally remove yesod for which I used the command
cabal install yesod-platform
Currently I have seen to exist a /home/username/.cabal folder, I just want to have my machine as close to previous state as possible (before trying to install yesod), this means removing all these things installed.
There is a lot of information on the web about insallation, however this seems not to be true for the uninstallation process.
Thank you in advance!

I guess what you're looking for is:
sudo apt-get --purge remove 'package-name'
This should remove the package along with all the fluff, I'm presuming you're using a Debian-based system.

I am under xubuntu, "sudo apt-get --purge remove yesod" worked for removing yesod, as for cabal my mistake was that I used "cabal" instead of "cabal-install", so it would be
"apt-get remove cabal-install", now it is removed.

Related

How to install libpq-fe.h?

I cannot figure this out for the life of me.
When I pip install django-tenant-schemas it tries to install the dependency psycopg2 which requires the Python headers and gcc. I have all this installed and still keep getting this error!
./psycopg/psycopg.h:35:10: fatal error: libpq-fe.h: No such file or directory
So to install libpq-fe-h I need to sudo apt-get install libpq-dev..
..which returns..
libpq-dev is already the newest version (10.10-0ubuntu0.18.04.1).
Then when I sudo find / libpq-fe.h it doesn't seem to be in my OS.
I am lost at this point. If anyone can help I would highly appreciate it.
For some reason, the file is missing on the system.
As you're using apt-get, the system is dpkg based, presumably Debian or it's derivative. You can try the Ubuntu's package search to get which package contains a file with name ending in libpq-fe.h.
I found the package is libpq-dev and file's absolute path is /usr/include/postgresql/libpq-fe.h.
FWIW, on a dpkg based system, you can check which package gives a file if you know the file's absolute path:
% dpkg -S /usr/include/postgresql/libpq-fe.h
libpq-dev: /usr/include/postgresql/libpq-fe.h
Also, unlike find, locate keeps a cache of found files (mlocate.db) that is created everyday via cron; so if the file happens to be removed after the last run, you can run locate libfq-fe.h to get the absolute path to the file without needing to check the Ubuntu package search online.
So the package is libpq-dev. Now, reinstalling it will get everything to the default state i.e. all relevant files will be copied to the right places. As it is only a library package, no user/system level configurations will be overridden (and dpkg will prompt you for action for any package that does that).
To reinstall the package:
sudo apt-get install --reinstall libpq-dev
For me, I realized it was trying to use the deprecated setup.py so I installed wheel (pip install wheel) and that sorted it all out.
Well after installing these libraries
sudo dnf install python-virtualenv openssl-devel gcc libffi-devel libxslt-devel issue was not gone.
I used mlocate to find where libpq-fe.h file is located. On my system (Fedora 32) it was located at /usr/pgsql-10/include/libpq-fe.h
yum install mlocate
sudo updateb
locate libpq-fe.h
After all added this line to ~/.bash_profile
nano ~/.bash_profile
export PATH=/usr/pgsql-10/bin/:$PATH
Works fine, I can easily install psycopg2 without any trouble.
You need to create a LD_LIBRARY_PATH that indicates the path of your library /user/pgsql-11/lib
Source: The 3rd point of build prerequisites at https://www.psycopg.org/docs/install.html#build-prerequisites

Debian/Raspbian install QGIS 3.x

Re-posted from GIS stackexchange as this is becoming more of a software question.
I'm trying to install QGIS 3.x on Raspbian Stretch with Desktop.
I found this build-from-source guide using this forum post, but my linux-fu is weak.
I followed sections 3.5 and 3.6 of that guide, and then started on section 3.8.
At the dpkg-buildpackage -us -uc -b stage, I get an "unmet build dependencies" error. When trying to sudo apt-get install the missing packages I get several "Unable to locate package" errors (libqscintilla2-qt5-dev, qt3d-assimpsceneimport-plugin, qt3d-defaultgeometryloader-plugin, and qt3d-scene2d-plugin).
I've already added deb https://qgis.org/debian unstable main and deb-src https://qgis.org/debian unstable main to my sources.list file (as per QGIS install page...but now I'm stumped as to what to do.
Do I need to add another source (which one?) to that file, or is it something completely different?
Alternative to building from source.
Issue: with the QGIS install instructions (assuming I followed them correctly) - it was unable to find the python3-qgis package.
Solution: basically use a different mirror than what the install recommends.
Starting from a fresh Raspbian Stretch with Desktop install.
Run: sudo apt-get update
Run: sudo nano /etc/apt/sources.list
Uncomment the deb-src line (not sure this matters).
Add the following line: "deb http://ftp.debian.org/debian sid main" (alternative mirrors can be found here).
Run: sudo apt-get update
Run: sudo apt-get install qgis python3-qgis qgis-plugin-grass
This will install ~300 packages, and can take a while (~4min to download for me). After the download there is a changelog/notice that must be read (keep pressing return then q). Soon after starting the download there is a prompt...once you're past that you should be safe to step away while it installs.
Once done you can launch QGIS (3.4 Madeira LTR as of this writing) by simply typing qgis from the terminal.

completely remove edb-debugger from ubuntu 18.04

I was trying to upgrade my edb debugger from 0.9 to 1.0. I cloned the repo from github, compiled it and installed it. Unfortunately I forgot to uninstall the old version itself so I ran into some problems. Ithen decided to remove all of edb and start from scratch. I did all sorts of sudo commands (i.e. purge autoremove etc) yet the edb icon is still in my applications menu and works (to a degree cause then I get failed to load necessary plugin). Probably help to mention that I used cmake to compile and install the newer version.
So the question is how do I go about removing all of edb and start over ?
idzireit
This will remove the edb-debugger package and any other dependant packages which are no longer needed.
sudo apt-get remove --auto-remove edb-debugger
If you also want to delete your local/config files for edb-debugger then this will work.
sudo apt-get purge edb-debugger
sudo apt-get purge --auto-remove edb-debugger
To fully install edb-debugger ,follow this link
https://github.com/eteran/edb-debugger/wiki/Installing
Or else try this in your terminal
sudo apt-get install edb-debugger
If this process do not work, please comment below
I have made a very ugly work around o get it working without any errors. When it loads up I changed the symbol directory to point at the symbol directory from the build. In my case this would be the following:
/home/USERNAME/edb-debugger/build/plugins/SymbolViewer/CMakeFiles/SymbolViewer_autogen.dir
Then I did the same with the plugin directroy and made it point to:
/home/USERNAME/edb-debugger/build
I left the third directory (Session Directory) alone. Might play around with that at a later date but it is working even though loaded with ugly hacks.
If anyone has any better answers please advise how to prettify this fix up some.

Poco/Data/SQLite/Connector.h: No Such file or directory

Asked a similar question recently but trying to simplify it since no one have been able to help.
I'm trying to compile a c++ program and I keep getting the error that it can't find Poco/Data/SQLite/Connector.h.
using: #include "Poco/Data/SQLite/Connector.h"
I've ran about a dozen installs trying to get this to work including:
sudo apt-get install openssl libssl-dev
sudo apt-get install libiodbc2 libiodbc2-dev
sudo apt-get install libpoco-dev
sudo gmake -s install under the downloaded libpoco dir.
I even see src/connector.cpp installed with the last.
New to C++ and Linux (raspbian on the pi 2), but can't seem to get the code to find this library.
Any suggestions?
In case anyone else has this issue.
libmysqlclient-dev needs to be installed first for these libraries to get installed with the poco install. Just doing mysql-client doesn't do it.
Change your path "Poco/Data/SQLite/Connector.h" to "Poco/Data/SQLite/connector.h". Hope this will help.

Install boost version 1.40

I am using a server running with Ubuntu 12.04
I want to install the boost libraries in it. I know
sudo apt-get install libboost-all-dev
will make the work done, but it installs the latest version version 1.52 or above.
But I need to install the particular version 1.40 as there is a problem in a simulator which I am using for my academic purpose. What is the particular command for that so that I can install the boost libraries along with the other requirements for it like the linking files
Thanks in advance
Quick answer: sudo apt-get install libboost-dev= 1.40.0.1
If it doesn't work, continue reading.
The apt-get does support installing a particular version of a package as long as it is in an archive that apt knows about. From the apt-get manpage:
A specific version of a package can be selected for installation by following the
package name with an equals and the version of the package to select. This will
cause that version to be located and selected for install. Alternatively a specific
distribution can be selected by following the package name with a slash and the version of
the distribution or the Archive name (stable, frozen, unstable).
For e.g. if you wanted to install apache 2.20 for Ubuntu, you would do something like:
sudo apt-get install apache2=2.2.20-1ubuntu1
Note that you may need to do some dependency resolution on your own in this case, but if there are any problems apt-get will tell you what is causing them. For e.g.(on 11.04)
sudo apt-get install apache2=2.2.20-1ubuntu1 \
apache2.2-common=2.2.20-1ubuntu1 \
apache2.2-bin=2.2.20-1ubuntu1 \
apache2-mpm-worker=2.2.20-1ubuntu1
Note: You must first check if build 1.40 is still available. For that use:
aptitude search libboost
If aptitude search command don't give you sufficient results, try sudo aptitude update and then run aptitude search again.
You might have to investigate whether debs from earlier Ubuntu versions can be installed. i.e. remove the current package, download the debs and try installing them. But there could be dependency on older versions of the standard library.If so, you can probably try downloading the source from launchpad.
As a last resort, download from boost.org and build it - painfully!
EDIT: I see you have asked the same question on ubuntu forums and it seems that you have 1.48 as the default. You might have to build the library itself. Can you try this apt-get
sudo apt-get install libboost1.40-all-dev=1.40.0-4ubuntu4
If this doesn't work, you will have to build it and install it yourself. You can download the source from
Download source (1.40.0): libboost 1.40.0 source files
After it's installed, run the following command to hold your installed version, preventing the package manager from automatically updating it in the future:
sudo echo "[packagename] hold" | sudo dpkg --set-selections
Source:How to Downgrade Packages on Ubuntu
Generally you download sources, build it (some parts are not just headers like filesystem on Windows). Then you can select which subset of libraries you want to install (you can make compact version with only what you need). Then by invoking bootstrap script you build it to another directory this subset of libraries you want and then you invoke install.
Here is a pretty good description how to do it: http://ubuntuforums.org/showthread.php?t=1180792