How to not use /usr/local/lib after uninstalling self build package? - linux

Initially, I had pcl-1.10 in /usr/(installed using sudo apt install libpcl-dev). Then I self-built pcl-1.12 in /usr/local/ for some reason. Now I uninstalled pcl-1.12 using sudo make uninstall and wanted to use the default pcl-1.10. But when I compiled my project, the error message showed
$ colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
Starting >>> lidarslam_msgs
Starting >>> ndt_omp_ros2
--- stderr: ndt_omp_ros2
make[2]: *** No rule to make target '/usr/local/lib/libpcl_surface.so', needed by 'align'. Stop.
make[1]: *** [CMakeFiles/Makefile2:80: CMakeFiles/align.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
---
Failed <<< ndt_omp_ros2 [0.16s, exited with code 2]
It seems that the PATH stills points to the /usr/local/lib even if I uninstalled the package. Is there a way I can reset PATH to the global package path? For this case, I believe the pcl-1.10's libpcl_surface.so is in /usr/lib/x86_64-linux-gnu/libpcl_outofcore.so .
I am working on ROS2 and compiling the CMakeList.txt using colcon. So I can't modify the makefile. I assume it is a PATH problem.
A way is to use symlink to link all the .so file in /usr/lib/x86_64-linux-gnu/ to /usr/local/lib but I found it kind of stupid...

Related

tsv-summarize: command not found

I downloaded the eBay tsv-utils and after following the steps I got this error and I'm not sure what to do.
$ git clone https://github.com/eBay/tsv-utils.git
$ cd tsv-utils
$ make
Make gave me some errors:
make[1]: dmd: Command not found
make[1]: *** [../makeapp.mk:18: /home/sylvia/Downloads/tsv-utils/bin/csv2tsv] Error 127
make[1]: Leaving directory '/home/sylvia/Downloads/tsv-utils/csv2tsv'
make: *** [makefile:96: csv2tsv] Error 2
The command csv2tsv works but when I use the command tsv-summarize it says:
tsv-summarize: command not found
I'm not sure what to do.
It seems like you have not installed the D compiler: Please download the D compiler from here: https://dlang.org/download.html.
If you just want to install tsv-utils however, you can download a pre-built binary from the project's github page: https://github.com/eBay/tsv-utils/releases/tag/v2.1.2

PCL 1.8.0 installation: Compile error for including QtGui

I'm trying to build PCL 1.8.0 on my Ubuntu 14.04 machine from source, following these instructions. But every time I get the following error:
[ 73%] Building CXX object apps/CMakeFiles/pcl_manual_registration.dir/include/pcl/apps/moc_manual_registration.cpp.o
In file included from ~/pcl/release/apps/ui_manual_registration.h:26:0,
from ~/pcl/release/apps/include/pcl/apps/../../../../../apps/include/pcl/apps/manual_registration.h:37,
from ~/pcl/release/apps/include/pcl/apps/moc_manual_registration.cpp:9:
/usr/include/vtk-5.8/QVTKWidget.h:40:25: fatal error: QtGui/QWidget: No such file or directory
#include <QtGui/QWidget>
^
compilation terminated.
make[2]: *** [apps/CMakeFiles/pcl_manual_registration.dir/include/pcl/apps/moc_manual_registration.cpp.o] Error 1
make[1]: *** [apps/CMakeFiles/pcl_manual_registration.dir/all] Error 2
make: *** [all] Error 2
for locate QWidget I get amongst others the following output:
...
/usr/include/qt4/QtGui/QWidget
...
/usr/include/qt5/QtWidgets/QWidget
...
So how can I resolve the error and install pcl?
The problem happens because your configuration is trying to mix Qt4 and Qt5 during PCL build.
According to the link you've provided, PCL is suppossed so be built against Qt4 in this case.
Try to remove everything in release directory and re-initialize CMake config with correct version of Qt.
Like that (following provided example):
cd ~/Documents/pcl
rm -rf relese
mkdir release
cd release
cmake -DCMAKE_BUILD_TYPE=Release -DPCL_QT_VERSION=4 -DBUILD_GPU=ON -DBUILD_apps=ON -DBUILD_examples=ON ..
make

glibc-2.14 when 'make install' failed whit 2 error

/usr/bin/install -c -m 644 include/limits.h /usr/local/glibc-2.14/include/limits.h
/usr/bin/install: include/limits.h' and /usr/local/glibc-2.14/include/limits.h' are the same file
make[1]: *** [/usr/local/glibc-2.14/include/limits.h] Error 1
make[1]: Leaving directory `/usr/local/glibc-2.14'
make: ***[install] Error 2
install glibc-2.14, when i enter 'make install' it show this 2 error
someone help me
Thanks
looks like you're trying to install glibc into the same place you built it ? simple answer: don't do that.
if that isn't what you're doing, please describe the exact ./configure and make and make install commands you're using.
use difference folder for the build and prefix, like:
the build folder path is ~/glibc-2.14/build
and the prefix folder path is /opt/glibc-2.14
it will solve this

build octave package from source

I want to install octaviz package in octave software.
From the documentation there is stated:
-You'll need octave 2.1.53 or later and VTK CVS to build octaviz. To compile octaviz, run ccmake . in the root directory of the source tree, then make and finally make install.
I first ran ccmake ., and it completed successfully after I installed some libs that I was missing.
But, the I ran "make" and it exits with the following errors:
>> make
[ 1%] Built target vtkWrapOctave
[ 1%] Building CXX object Common/CMakeFiles/octaviz.dir/octaviz.o
/home/user12345/octave/octaviz/Common/octaviz.cc:31:24: fatal error: octave/oct.h: No such file or directory
#include <octave/oct.h>
^
compilation terminated.
make[2]: *** [Common/CMakeFiles/octaviz.dir/octaviz.o] Error 1
make[1]: *** [Common/CMakeFiles/octaviz.dir/all] Error 2
make: *** [all] Error 2
Any idea what I am missing here?
You are missing the octave/oct.h header. This usually means that you don't have Octave installed. If you do have it installed, maybe you are missing the header files and shared libraries (if you are using Linux, did you install octave's -dev or -devel packaqes?) If you have them installed, you must have ran the configure script incorrectly. Either specify the correct options or set the CXX_FLAGS. If you don't know about compiler flags you probably should not change them and instead figure out how to install the octave libraries correctly.

Strange error while trying to make install Gtkaml (and libvala-0.16) in Ubuntu

I have downloaded and tried to install Gtkaml but I am having troubles.
I followed their instructions to install it, but it still fails.
I downloaded it into my downloads folder, then ran Terminal:
cd ~/Downloads
ls
cd gtkaml-0.5.94
./configure
But then it failed at ./configure, I can't remember what it was, but it was missing something so I then ran:
sudo apt-get build-dep gtkaml, then I re-ran ./configure and it succeeded. So then I proceeded to sudo make, but then it said,
jase#Jase-PC:~/Downloads/gtkaml-0.5.94$ sudo make make all-recursive
make1: Entering directory /home/jase/Downloads/gtkaml-0.5.94'
Making all in libgtkaml make[2]: Entering directory
/home/jase/Downloads/gtkaml-0.5.94/libgtkaml' /usr/bin/valac -C -H
gtkaml.h --library gtkaml --vapidir . --pkg config --pkg glib-2.0
--pkg libvala-0.16 --pkg libxml-2.0 --pkg gio-2.0 gtkamlcodecontext.vala gtkamlmarkupparser.vala gtkonparser.vala
gtkamlmarkupscanner.vala gtkamlmarkupresolver.vala
gtkamlcodeparserprovider.vala ast/gtkamlmarkupattribute.vala
ast/gtkamlmarkupcomplexattribute.vala gtkamlmarkupclass.vala
ast/gtkamlmarkuptag.vala ast/gtkamlmarkuproot.vala
ast/gtkamlmarkupchildtag.vala ast/gtkamlmarkupunresolvedtag.vala
ast/gtkamlmarkupmember.vala ast/gtkamlmarkuptemp.vala
ast/gtkamlmarkupreference.vala gtkamlmarkupnamespace.vala
gtkamlmarkuphint.vala gtkamlmarkuphintsstore.vala
gtkamlpropertyspec.vala workarounds/gtkamldatatypeparent.vala
workarounds/gtkamlcallable.vala workarounds/gtkamlvalaparser.vala
workarounds/gtkamlnamespacevisitor.vala error: Package libvala-0.16'
not found in specified Vala API directories or GObject-Introspection
GIR directories Compilation failed: 1 error(s), 0 warning(s) make[2]:
*** [libgtkaml.stamp] Error 1 make[2]: Leaving directory/home/jase/Downloads/gtkaml-0.5.94/libgtkaml' make1: *
[all-recursive] Error 1 make1: Leaving directory
`/home/jase/Downloads/gtkaml-0.5.94' make: * [all] Error 2
So then I ran sudo apt-get install libvala-0.16 to install libvala-0.16. It then said,
Reading package lists... Done Building dependency tree Reading
state information... Done Note, selecting 'libvala-0.16-dev' for regex
'libvala-0.16' Note, selecting 'libvala-0.16-0' for regex
'libvala-0.16' Note, selecting 'libvala-0.16-0-dbg' for regex
'libvala-0.16' libvala-0.16-0 is already the newest version.
libvala-0.16-0-dbg is already the newest version. libvala-0.16-dev is
already the newest version. The following packages were automatically
installed and are no longer required: libqt5declarative5 par2
python-support Use 'apt-get autoremove' to remove them. 0 to upgrade,
0 to newly install, 0 to remove and 0 not to upgrade.
So I re-ran sudo make. But same error as the original make error.
How do I make/make install this thing?
This should fix the problem
sudo apt-get install libvala-0.16-dev
What you need is a libvala development package.
I have been unable to make from source obtained from the Google code website. But I have been able to install it from the Software Center.
I have written and compiled a sample application:
<Window xmlns:g="http://gtkaml.org/0.4" xmlns="Gtk" g:name="GTKamlSample"
type="{WindowType.TOPLEVEL}" title="Window"
position="{WindowPosition.CENTER}" default-width="300" default-height="150"
destroy="Gtk.main_quit">
<Button label="Click me." clicked='{target.label="Thank you.";}' />
<![CDATA[
static int main (string[] args)
{
Gtk.init(ref args);
var window = new GTKamlSample();
window.show_all();
Gtk.main();
return 0;
}
]]>
</Window>
Which works. So your best bet is to use Software Center if you run into troubles installing it from source.

Resources