Trouble when running autogen.sh - linux

I have downloaded R tree from http://libspatialindex.github.com/
Since on running ./autogen.sh I was getting file/folder not found, therefore I downloaded the file autogen.sh from the github repository given below:
https://raw.github.com/libspatialindex/libspatialindex/9a5a2f4d83c3ec7be4dbf2c8a86341703d837185/autogen.sh
Now when I run ./autogen.sh I am getting "Permission denied"
And if I run sh ./autogen.sh I am getting:
glibtoolize or libtoolize not found. Giving up!
Please suggest what should I do now
EDIT:Also I want to use libspatialindex inside my C++ project. I am using netbeans. I mean I want to use the functions inside libspatialindex inside my netbeans project. How should I use the same. Right now I have run the config and make command in a separate directory. I am not getting as to how to use them inside my project.

Install libtool from your package manager.

To fix the 'Permission Denied' error you need to edit the permissions of your autogen.sh file. Run this command:
chmod +x autogen.sh

I got this error after restoring a library from a Backup to a NTFS directory.
I discovered that another reason this can occur is if the mounted partition has noexec flag on it.
Run mount to see if noexec has been set on the partition.
Update /etc/fstab or add -o exec to the mount command.
Hope, it helps others in the same situation as me.

Related

Getting folder conflicts when running yum groupupdate inside a chroot environment

I have a chroot environment where i am getting folder conflicts when I am running the below command.
/usr/bin/yum --verbose --assumeyes --installroot /home/prateek/project/.ova_work_dir/mnt/dst_root --config=/home/prateek/project/.ova_work_dir/mnt/dst_root/etc/yum.repos.d/project-upgrade.repo --obsoletes groupupdate '*' project
Below is the error
Running transaction test
Transaction check error:
file /usr from install of messagebus_c-1.0.0-0.x86_64 conflicts with file from package filesystem-3.2-20.el7.x86_64
I have below two questions to ask:
1) Why i am getting folder conflict when yum is running transaction test as I have seen file conflicts but not folder conflicts.
2) How would I resolve this folder conflicts.
The messagebus_c RPM specfile needs to be edited to not "own" /usr but instead all the files in it, e.g. /usr/*.
Can you try this ?
/usr/bin/yum --verbose --assumeyes --installroot=/home/prateek/project/.ova_work_dir/mnt/dst_root --config=/home/prateek/project/.ova_work_dir/mnt/dst_root/etc/yum.repos.d/project-upgrade.repo --obsoletes groupupdate '*' project
issue was
missing equal to sign --installroot /home
expected like this --installroot=/home
This can happen when messagebus_c spec file has:
%install
touch %{buildroot}/usr
%files
/usr
I.e. here the /usr is a file. While filesystem provides it as a directory. You cannot have both. A directory cannot be a file. And vice versa.

Linux Newb ./config: No Such file or directory

I'm new to Linux and I'm trying to install a program called OpenSSL. I'm following a guide and it says to download the tar file, so i created a directory called Website_Related with the path
~/Downloads/Website_Related
and downloaded the tar file from that directory with the command
wget http://www.openssl.org/source/openssl-1.0.2o.tar.gz
This went fine. Then the guide says to execute the following command
$ ./config \
--prefix=/opt/openssl \
--openssldir=/opt/openssl \
enable-ec_nistp_64_gcc_128
I tried executing this command from the same directory where I downloaded the file to and I get an error "No such file or directory". I also tried executing the command from my home directory and got the same error. The guide gives an explanation for the "enable-ec_nist_64_gcc_128" but not the rest of the command.
What is going on here? I did some research and saw . is often a directory having to do with configuration in your home directory, and I can see it in my home directory with
ls -a
command, but if i try to go into it with
cd .
that fails. Could someone please explain to me what this ./config command is attempting to do, and why it is failing?
Thank you.
You need to unpack it first:
tar vxf openssl-1.0.2o.tar.gz

Running a script during Debian Packaging

I have some source files and one bash script to run during installation in Ubuntu machines.
What is an easy guide to Debian packaging and create packages for own use?
My practice includes:
I made a sample which copies the files in to /usr/bin/ folder using pbuilder environment, but got struck with running a process.sh file which contains:
set -x
cpath=`pwd`
cd /usr/local/
mkdir libexec
cd
cd $cpath
cp askpin /usr/local/libexec/
cp badpin /usr/local/libexec/
cp msg /usr/local/libexec/
ldconfig
Any help is appreciated.
Traditionally these scripts go into the debian/DEBIAN directory along with the control file and are called preinst, postinst, prerm and postrm.
They are run when it is appropriate by the installation/removal process.
Include a shebang at the top of these files.
See: https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html
Edit:
Just chased down pbuilder and realised that the above answer probably means nothing to you.
I didn't know pbuilder existed, if I had maybe I would have used it, instead of scratching my debian builds into the bare metal, where the above answer makes sense.

How to create a "configure" file?

Recently I downloaded a file using the following link
git clone git://github.com/mapserver/mapcache.git
Inside the downloaded mapcache folder I can not find a configure file to do "./configure". But the installation help file tell:
Unix compilation instructions
If you are using a git clone rather than a tarball distribution, you
must first run autoconf in the root directory, to create the configure
file from configure.in:
$ autoconf
For unix users, the compilation process should resume to:
$ ./configure
$ make
(as root)
make install-module
The installation script takes care of putting the built module in the
apache module directory.
To do ./configure there should be a configure file isn't it? Please show me how to make one to get rid of this problem.
maintainer speaking ...
mapcache and mapserver are switching to cmake for the next release and the docs for the master branch need updating. You can either use the branch-1-0 branch to continue using autoconf builds, or use cmake with master:
$ mkdir build
$ cd build
$ cmake ..
$ make
$ sudo make install
The help file tells you exactly what you need to do
If you are using a git clone rather than a tarball distribution, you must first run autoconf in the root directory, to create the configure file from configure.in
If you don't already have autoconf installed you'll need to install it in the normal way for your distribution.
The repository seems out of sync with the documentation
there is no configure.in as mentioned in the INSTALL file (nowhere not only in the root directory)
there is just a Makefile.vc file for MSVC++
You should contact the maintainer

Install librsync on Amazon EC2 instance

I have trouble installing this library called librsync on an Amazon standard linux instance.
I tried this:
yum install librsync-devel
but I got No package librsync available (fair enough I guess!)
I also followed the install instructions, which says:
To build and test librsync from the extracted distribution do;
$ ./configure
$ make all check
I'm no linux expert, I extracted the library files and run these commands:
[ec2-user#ip-**-***-**-*** librsync]$ ./configure
-bash: ./configure: Permission denied
[ec2-user#ip-**-***-**-*** librsync]$ sudo ./configure
sudo: ./configure: command not found
[ec2-user#ip-**-***-**-*** librsync]$ sudo configure
sudo: configure: command not found
I changed permission of the configure file and run the ./configure command again. I got a long list of yes (full log here) and then this:
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
I'm totally lost. Any idea how to install this librsync library on EC2 linux instance?
From the error, it looks like your configure script is not set to be executable. You can check with ls -l configure. You should see a line that starts with something like -rwxr-xr-x. If not, you can run chmod +x configure to add executable permission to it.
If the permissions on that file are not right, it would be good to check the rest of the files in the distribution. How did you get the file? Downloading the tarball from Sourceforge? Download the ZIP from Github? Checking out from Github? And how did you extract it? If you could fill those details in to your question, as well as the full output of ls -l, that might help us figure out what happened.
edit to add: It looks from your configure log like cpp (the C preprocessor) is looking for cc1plus, which is part of g++. You can install that with yum install gcc-c++ (remember to run as root or with sudo).
Also, in regards to your comment, I would recommend copying the .tar.gz file directly to the Linux machine, and extracting it with tar xvzf myfile.tar.gz rather than extracting it on a Windows machine and uploading it. There are enough differences in the filesystem (how permission bits work, case sensitivity), that the process of extracting files on Windows and uploading the extracted files with something like winscp can cause problems like this.

Resources