How to install GNU flex or lex on Raspbian Raspberry - raspberry-pi

I need to install EyedDB for studies and I'd like to run it on my Raspbian Raspberry.
I downloaded and unzipped at /usr/programs/EyeDB where I ran first with Pi user as requested and later as root:
./configure
Then a bunch of lines is coming out and ended with
error: you must have Gnu flex or lex installed to compile EyeDB
Any clues?

Well, just get it like you would get anything else:
# apt-get install flex
You'll also need
# apt-get install bison
# apt-get install libreadline6-dev # for a non-maddening command line
...after which configure --disable-doc and make will sing their merry little songs and be happy (The --disable-doc is needed as javadoc chokes on Database.java)
flex and bison are the GNU versions of the venerable Unix tools lex (scanner generator) and yacc (parser generator), used in countless compilers and interpreters. They are never needed at runtime, so there is no need for separate {bison,flex} and {bison,flex}-dev packages.

Related

Showing a list of software with LGPL during boot

I remember seeing a list of software components with LGPL licenses during the start up of Linux root file system built with Yocto Project. I can't seem to figure out what enables this, even after going through the Mega Manual.
NOTICE: This file system contains the following GPLv3 packages:
autoconf
bash-dev
bash
binutils
cifs-utils
cpio
cpp-symlinks
cpp
dosfstools
elfutils
g++-symlinks
g++
gawk-dev
gawk
gcc-symlinks
gcc
gdb
gdbc6x
gdbserver
gettext-dev
gettext
gzip
libbfd
libcairo-dbg
libcairo-perf-utils
libdw1
libelf1
libgdbm-compat4
libgdbm-dev
libgdbm4
libgettextlib
libgettextsrc
libgmp-dev
libgmp10
libgmpxx4
libidn11
libmpc3
libmpfr4
libreadline-dev
libreadline7
libunistring2
m4-dev
m4
make
nettle-dev
nettle
parted
python3-pycairo-dev
python3-pycairo
which
If you do not wish to distribute GPLv3 components please remove
the above packages prior to distribution. This can be done using
the opkg remove command. i.e.:
opkg remove <package>
Where <package> is the name printed in the list above
NOTE: If the package is a dependency of another package you
will be notified of the dependent packages. You should
use the --force-removal-of-dependent-packages option to
also remove the dependent packages as well
Found my answer - it's from arago-gpl-notice from meta-arago. It only displays GPLv3 also.

How to start IDLE that comes with Python 3.6

I am using Linux Mint 18. I installed Python 3.5 and 3.6 using apt-get in the terminal. I can open IDLE of Python 2.7 and 3.5 using commands idle and idle3 respectively. How can I access IDLE that comes with Python 3.6?
Try the command idle3.6. python3 and idle3 are still associated with your system Python, which is 3.5.
Simply typing in idle3.6 should work just like carusot42 mentioned. If it doesn't work, perhaps you might want to see if everything else is installed correctly. Here are the steps I followed which worked perfectly fine for me. I am also running Linux Mint 18. The steps that I followed were:
Installed the prerequisites of Python. Do that by typing in the following commands -
sudo apt-get install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
Download Python using the following command and extract it (use your desired location) -
cd /usr/src
wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz
sudo tar xzf Python-3.6.0.tgz
The next step is to compile Python source. To do that type in the commands below-
cd Python-3.6.1
./configure
sudo make altinstall
make altinstall is used to prevent replacing the default Python binary
file /usr/bin/python
You should be good to go. You check your Python version by typing python3.6 -V in the terminal.
Once you do that, type in idle3.6 and then Python 3.6.1 shell should open for you.
The Software Manager in Linux Mint lists the Python Packages and IDLE Packages
separately. After you install Python, go look up the associated IDLE package in the Software Manager and install it. Reboot and it should work fine. It worked for me.

Cannot install perl module PerlIO::locale within docker

I am running into problems installing certain perl modules within docker. Is there a recommended stable way of doing this for the default ubuntu image?
Also I'm unlear how to access the install log file in a failed build (ie for cpan minus at /.cpanm/build.log).
The following Dockerfile fails with the message:
Please specify prototyping behavior for locale.xs (see perlxs manual)
When it attempts to resolve the dependency on PerlIO::locale.
# use the ubuntu base image provided by dotCloud
FROM ubuntu
# make sure the package repository is up to date
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
# install perl and modules
RUN apt-get install -y make
RUN apt-get install -y perl
RUN apt-get install -y cpanminus
RUN cpanm -v Text::Names
Some modules include C code which needs to be compiled on the target systems (“XS modules”). For that, you'll need a complete C toolchain. This implies make, the compiler: gcc, and the C standard library headers: libc-dev. The build-essential metapackage includes these components (and some more), so I'd recommend you install that instead.
According to perlxstut, that's just a warning rather than a fatal error.
There's a clearly documented default (perlxs: "Prototypes are enabled by default"). Furthermore, this particular XS component doesn't actually export any functions to Perl, so the setting is never even used.
The warning can be silenced by adding a PROTOTYPES: ENABLE to locale.xs — you could even ask the author to make that change — but it won't make any difference.
The problem is elsewhere.

Trying to install PostStat, a library to add statistics function into Postgres

I am trying to install Poststat on debian squeeze.
http://poststat.projects.postgresql.org
This project looks not so old (2008), but I am having some difficulties to install it. Although it seems to be a really interesting project, google is empty. I'll try here to sum up what I did (postgres 8.4 is installed) :
apt-get install fort77 postgresql-server-dev-8.4 libblas-dev liblapack-dev gfortran
First, as it is said on the official website, unpack the tar.gz and go in the directory f77stat and 'make'.
Then if you have libpq-dev installed, on debian squeeze it install also its owns pg_config in /usr/bin/ wich report false infos. (see http://postgresql.1045698.n5.nabble.com/Bug-report-Wrong-version-in-pg-config-td2123792.html)
One solution :
mv /usr/bin/pg_config pg_config_bak
ln -s /usr/lib/postgresql/8.4/bin/pg_config pg_config
This is important because the makefile of Poststat is retrieving some info with pg_config.
Then in the main Makefile there is the line :
-lblas -llapack -lg2c
Install those package for blas and lapack :
apt-get install libatlas-base-dev libatlas-dev libatlas-doc libatlas3gf-base
Now my problem is about g2c. According to google, g2c is obsolete so I edited the Makefile and replace -lg2c with -lgfortrant
Last step :
compile and import the new statitics functions in my database.
make && sudo make install
psql -f poststat.sql <database>
Sadly,
psql:poststat.sql:18: ERROR: unable to load the library
« /usr/lib/postgresql/8.4/lib/poststat.so » : /usr/lib/postgresql/8.4/lib/poststat.so:
undefined symbol: s_stop
Any thought ? fortran is not my world, and packages seem to have change a lot in debian about fortran. My switch from -lg2c to -lgfortrant is probably wrong. In fact removing this include does at the end produce the same error.
libg2c belongs to the g77 (http://stackoverflow.com/questions/2406581/what-is-libg2c-library), which is obsolete and unsupported for many years. Switching to a more current compiler involves more than just replacing this library. You need to replace the compiler also, e.g., gfortran. You might need to change the default compiler options of gfortran to be able to compile FORTRAN 77 code. I use: -O2 -ffixed-form -ffixed-line-length-none. If you use gfortran as the linker you won't need to explicitly include the fortran run-time library.
change -lg2c by -lf2c
Add to poststat.c , at the end
int MAIN__(){
return (0);
}

Why can't I install DBD::mysql so I can use it with Maatkit?

I'm trying to install Maatkit following the maatkit instructions. I can't get past having to install DBD::mysql. "Warning: prerequisite DBD::mysql 1 not found."
When I try to install DBD::mysql from cpan, I get very helpful "make had returned bad status, install seems impossible".
Perl is "v5.8.8 built for darwin-thread-multi-2level", the one that came with OS X. I also tried building from source with same result.
We need more of the error message. Most likely, you are missing the MySQL client development files. I don't know how to install these on OSX. Also see this older post on OSX 10.5.2 , in which some other failures with the mysql client libraries are found.
Possibly post this question with more parts of your error message at perlmonks.org, if stackoverflow doesn't allow for convenient pasting of your make session or rather the last 20 or 10 lines of it.
Some more Googling with site:perlmonks.org also finds this post which has some more details on things to watch out for when installing DBD::MySQL. Depending on how comfortable you feel with the installation, you might want to manually run the tests, supplying a test database and test user or even skip testing the module.
After a bit more googling, this worked for me:
sudo ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql
sudo ln -s /usr/local/mysql/include /usr/local/mysql/include/mysql
sudo perl -MCPAN -e 'install Bundle::DBD::mysql'
press enter a bunch of times, then in your maatkit folder:
perl Makefile.PL
sudo make install
and you'll find the mk-* programs in /usr/local/bin/
You will want to install MySQL first. I usually use the binary packages they provide for OS X. The packages do include the headers and MySQL client libraries which DBD::MySQL requires. Once the MySQL package is installed, DBD::MySQL should install without issue.
Here is my output:
$ perl Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite DBD::mysql 1 not found.
Writing Makefile for maatkit
$ mysql --version
mysql Ver 14.12 Distrib 5.0.51b, for apple-darwin9.0.0b5 (i686) using readline 5.0
I notice that there are in effect DBD::MySQL packages in the fink repositories. For example:
ayaz#ayazs-macbook$ fink list | grep -i 'dbd-mysql'
dbd-mysql-pm586 3.0008-10 Perl5 Database Interface to MySQL
dbd-mysql-pm588 3.0008-10 Perl5 Database Interface to MySQL
Perhaps installing through fink one of those packages may help alleviate your troubles.
Also, and I cannot be certain of this, you may want to install for MySQL-5.x (if you have that version installed) the mysql15-dev and mysql15-shlibs packages. I installed those through fink thus:
$ sudo fink --use-binary-dist install mysql15-dev