How to install a lex tool in Manjaro Linux? - lex

I tried installing bison and flex :
sudo pacman -Syu install bison flex
This is what I got:
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
multilib is up to date
error: target not found: install
warning: flex-2.6.4-2 is up to date -- reinstalling

sudo pacman -Syu install bison flex
There is not a package nor a sub-command named "install". To install/upgrade
packages, pacman -Syu is usually enough:
sudo pacman -Syu bison flex
From the "EXAMPLES" section in the pacman(8) man page:
pacman -Syu gpm
Update package list, upgrade all packages, and then install gpm if it wasn’t already installed.
See also Pacman#Installing_packages.

Related

Why is installing PostGIS 3 on RHEL 8 / CentOS 8 impossible?

I am attempting to install the latest PostGIS 3.0.x on CentOS 8, with no luck.
I don't think anyone is running PostGIS on RHEL 8 or CentOS 8, I can't understand why not. It does not seem possible to install.
I have successfully installed Postgres 12.0 by disabling the RHEL AppStream
Steps I took installing postgres 12 on CentOS 8:
1)
#dnf install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
2)
#dnf --disablerepo AppStream install postgresql12
#dnf --disablerepo AppStream install postgresql12-server
I am attempting now to install PostGIS.
#dnf list --available | grep postgis30
I see that postgis30_96 is the latest offered (as listed below):
postgis30_96.x86_64 3.0.0alpha4-6.rhel8 pgdg96
postgis30_96-client.x86_64 3.0.0alpha4-6.rhel8 pgdg96
postgis30_96-client-debuginfo.x86_64 3.0.0alpha4-6.rhel8 pgdg96
postgis30_96-debuginfo.x86_64 3.0.0alpha4-6.rhel8 pgdg96
postgis30_96-devel.x86_64 3.0.0alpha4-6.rhel8 pgdg96
postgis30_96-docs.x86_64 3.0.0alpha4-6.rhel8 pgdg96
postgis30_96-gui.x86_64 3.0.0alpha4-6.rhel8 pgdg96
postgis30_96-gui-debuginfo.x86_64 3.0.0alpha4-6.rhel8 pgdg96
postgis30_96-utils.x86_64 3.0.0alpha4-6.rhel8 pgdg96
When I try to install with the following command:
#dnf install postgis30_96
I get these errors:
Last metadata expiration check: 1:22:58 ago on Tue 15 Oct 2019 08:25:10 PM UTC.
Error:
Problem: cannot install the best candidate for the job
- nothing provides hdf5 needed by postgis30_96-3.0.0alpha4-6.rhel8.x86_64
- nothing provides xerces-c needed by postgis30_96-3.0.0alpha4-6.rhel8.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
I look for xerces-c, and nothing is returned:
#dnf list --available | grep xerces-c
Where do I get xerces-c to install?
I look to see if hdf5 is available to install (dependency)
#dnf list --available | grep hdf5
and nothing is returned. How do I satisfy these dependencies, so that PostGIS will install?
I goto the hdf5 website, download the source and it's a BIG FAT MESS. The build/install instructions do not work - the code is out of sync with the install instructions.
I check the hdf5 website and find another set of build/install instructions, and they too are out of sync with the latest code base. I don't know which way is up with this project, if it's a zombie project out there on the web, seemingly alive, but nobody's home.
How do I get hdf5 easily onto my system and xerces-c so that nothing existing gets mucked up? I would prefer to install these through any somewhat sanctioned CentOS 8 package repo using dnf.
I can't log this issue on the PostGIS ticket tracking system. Logging a ticket there requires an OSGEO ID, and when I request a 'mantra' to get started, nothing is returned, no response,
OSGEO is yet another zombie project, nobody's home. https://www.osgeo.org/community/getting-started-osgeo/osgeo_userid/
Please respond only if you have actually done this yourself on a CentOS 8 machine or VM, while I appreciate suggestions, pointers or imaginations from others, it pollutes r/postgis reddit with misinformation, non-working solutions, and not only wastes my time with dead ends, but also the time of others.
Someone else inevitably comes along with the same problems and is misguided with these those that are well-intentioned, but provide incorrect or incomplete information.
I had the same problem and finally found the solution. I need postgis25 for postgresql10, so I typed this command
dnf --enablerepo=PowerTools install postgis25_10
The PowerTools repo has the packages from codeready-developer repo, from Redhat CodeReady Studio. It contains a lot of useful tools.
Cannot enable PowerTools for RHEL 8
https://access.redhat.com/discussions/5417621
Remarks: PowerTools is a CentOS repository. On RHEL 8 we have the CodeReady Builder repository!
I am now able to install PostGIS-3 for PostgreSQL-12 on RHEL-8.
Solution:
sudo subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms
dnf install postgis30_12
Summing up the previous answers, these are the commands needed to install PostGIS-3 on CentOS-8:
dnf -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
dnf -qy module disable postgresql
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf --enablerepo=PowerTools install postgresql12-server postgresql12-contrib postgis30_12
Many of the answers were helpful. To sum up the steps I had to take and errors in the instructions at https://people.planetpostgresql.org/devrim/index.php?/archives/107-Installing-PostGIS-3.1-and-PostgreSQL-13-on-CentOS-8.html
As mentioned by Marcelo, for RHEL use code-ready, not powertools.
As mentioned in this thread, don't mix packages. Run dnf -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
to get the pgdg repo before installing postgres. Then run dnf -qy module disable postgresql if needed then install postgres like sudo dnf install -y postgresql13-server
The command to install epel-repo listed here may not work. Try sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Get the name of the latest postgis release with this command. sudo dnf list --available | grep postgis3 As mentioned by Nick, the second two digits are your postgres version.
Install postgis sudo dnf -y install postgis3x_xx I repeat, the second two digits are your postgres version.
So, in summary, to install postgres and postgis on my rhel8 sytstem, I ran these commands in this order.
sudo dnf -qy module disable postgresql
sudo dnf -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo dnf install -y postgresql13-server
sudo /usr/pgsql-13/bin/postgresql-13-setup initdb
sudo systemctl enable postgresql-13
sudo systemctl start postgresql-13
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms
sudo dnf -y install postgis31_13
The postgis30_96 packages are for Postgres 9.6. You need postgis30_12 for Postgres 12.
These packages are definitely in the repo, so if your dnf list isn't seeing them, it may be an instance of a known issue in which "yum/dnf refuse to find/install many packages from PGDG repository on RHEL8".
As a workaround, the Postgres Yum Howto recommends this installation procedure:
dnf -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
dnf -qy module disable postgresql
dnf install postgresql11-server postgresql11-contrib
Percona Postgresql 13 And Postgis 3.0
https://www.percona.com/doc/percona-repo-config/index.html
dnf remove postgresql
sudo dnf install https://repo.percona.com/yum/percona-release-latest.noarch.rpm
sudo percona-release setup ppg-13
You can refer here:
https://www.percona.com/doc/postgresql/LATEST/installing.html#using-the-rpm-format
sudo dnf module disable postgresql
sudo dnf install percona-postgresql13-server
sudo dnf install percona-pg_repack13
sudo dnf install percona-pgaudit
sudo dnf install percona-pgbackrest
sudo dnf install percona-patroni
sudo dnf install percona-pg-stat-monitor13
sudo dnf install percona-postgresql13-contrib
/usr/pgsql-13/bin/postgresql-13-setup initdb
sudo systemctl start postgresql-13
PostGIS
dnf -y config-manager --set-enabled PowerTools
dnf install -y postgis30_13 postgis30_13-client
What helped me in CentOS container (as a root):
yum -y install dnf-plugins-core && yum config-manager --set-enabled powertools
Installing dnf-plugins-core and enabling powertools.

Error while installing Omnet++ on Ubuntu 16.04 : Cannot find osgEarth

I followed the installation guide and installed all the packages mentioned. However, I end up with this error message while running ./configure
checking for osgEarth with CFLAGS=" -fPIC -fno-stack-protector " LIBS=" -losgEarth -losgEarthUtil"... no
configure: error: Cannot find osgEarth 2.7 or later. Set WITH_OSGEARTH=no in configure.user to disable this feature or install an up to date version of osgEarth.
Here is a link to my config.log file : config.log
Cannot find osgEarth 2.7 or later
osgearth 2.7 for Ubuntu 16.04 → https://launchpad.net/~ubuntugis/+archive/ubuntu/ppa →
sudo add-apt-repository ppa:ubuntugis/ppa
sudo apt update
sudo apt install libosgearth-dev // you get "2.7"
// All prerequisites :
sudo apt install g++ libxml2-dev libosgearth-dev bison flex clang swig libqt5opengl5-dev qt5-qmake openjdk-8-jre libopenmpi-dev tcl8.5-dev tk8.5-dev
Installing the libgeos-dev package, and then editing the configure.user file in my OMnet++ source directory solved my problem.
$ sudo apt-get install libgeos-dev
Change the line #OSGEARTH_LIBS= to this:
OSGEARTH_LIBS=" -losgEarth -losgEarthUtil -lgeos_c "
Make sure to remove the # in the beginning.
Now run:
$ . setenv
$ ./configure
And it should work..
Others have also faced this problem before and have the fix mentioned here solved their issues:
http://gmt.soest.hawaii.edu/boards/1/topics/4621
https://trac.osgeo.org/postgis/changeset/11363
Answered by Attila Török on the omnetpp google group (omnetpp#googlegroups.com)

Raspberry Pi crosscompile on Ubuntu 13.10 "libstdc++.so.6" not found

I've followed the tutorial on SE as well as trying the extra steps from Hertaville and bootc but I still get the error that prompted the original SE question. I'm stumped.
I get five steps into the process before I get the error:
sudo apt-get install git rsync cmake lib32z1 lib32ncurses5 lib32bz2-1.0
git clone git://github.com/raspberrypi/tools.git
export PATH=$PATH:$HOME/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
. ~/.bashrc
arm-linux-gnueabihf-gcc -v
Error:
arm-linux-gnueabihf-gcc: error while loading shared libraries:
libstdc++.so.6: cannot open shared object file: No such file or directory
libstdc++.so.6 is present in all three directory trees mentioned in the tutorials as well as ./lib/x86_64-linux-gnu/libstdc++.so.6, but adding the relevant one to the path doesn't help (see below). I suspect there's a library path not being set, but I have no idea what that is.
I'm doing this in a virtual machine running Ubuntu 13.10 with netbeans and other tools, plus a LAMP stack installed. netbeans will build and run C/C++ executables just fine (and obviously IO can do the same from the command line).
Other things I've tried without success
export PATH=$PATH:$HOME/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/lib
Hertaville suggest adding 32 bit architecture:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6-i386 lib32stdc++6 zlib1g:i386
And the "build-essential" package:
sudo apt-get install build-essential git
Which also didn't help. I've also rebooted just in case.
As expected the answer is trivial - install lib32stdc++6
The first line above should read:
sudo apt-get install libc6-i386 lib32z1 lib32stdc++6

In Centos 6.4,when configure Emacs

In Centos 6.4,when configure Emacs,it shows:
configure: error: The required function `tputs' was not found in any library.
The following libraries were tried (in order):
libtinfo, libncurses, libterminfo, libtermcap, libcurses
Please try installing whichever of these libraries is most appropriate
for your system, together with its header files.
For example, a libncurses-dev(el) or similar package.
How to fix it,what's the problem in it.
sudo yum install ncurses-devel
then ./configure again
Try to install libncurses-dev with
bash
apt-get install libncurses-dev
I'm on a Debian Wheezy derived distribution (CrunchBang)
Trying to install Emacs 24.5.1
Had to install libncurses5-dev, then run ./configure
$ sudo apt-get install ncurses-devel
...
E: Unable to locate package ncurses-devel
$ sudo apt-get install libncurses5-dev

Apache Thrift 0.9.0 won't configure per instructions

Apache Thrift 0.9.0 won't configure per instructions on base CentOS install. When you try to do the ./configure, it gives you an "Error: libcrypto required"
The documentation says that you need:
sudo yum install automake libtool flex bison pkgconfig gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel
http://thrift.apache.org/docs/install/centos/
The documentation is missing the openssl dependency, you also need to include:
openssl-devel.x86_64 in your package install list above
What you really need to install is
sudo yum install automake libtool flex bison pkgconfig gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel openssl-devel.x86_64
Or just this if you've already installed the above per the original instructions.
sudo yum install openssl-devel.x86_64