Compiling psqlODBC on CENTOS 7 gives me errors in connection.c - undeclared identifiers - postgresql

So i'm stuck again.
What I want to do: access a postgreSQL database via database link from Oracle (12.1 - yes, I know it's old ...).
Oracle is running on Centos 7.
Initially I did a
yum -y install postgresql-odbc
yum -y install unixODBC
and was able to access postgreSQL (running on another machine).
But it didn't work for UTF-8 data. Got a hint that this might be due to an old version of unixODBC so I decided to compile from source (as the centos package is rather old).
Compiling and installing unixODBC worked without a hassle:
wget http://www.unixodbc.org/unixODBC-2.3.11.tar.gz
tar xzf unixODBC-2.3.11.tar.gz
cd unixODBC-2.3.11/
./configure
make
make install
But compiling psqlODBC is where it's at:
yum install postgresql
yum install postgresql-devel
wget https://ftp.postgresql.org/pub/odbc/versions/src/psqlodbc-13.02.0000.tar.gz
cd psqlodbc-13.02.0000/
./configure
make
...
Make gives me the following output:
[root#tukanbox psqlodbc-13.02.0000]# make
make all-am
make[1]: Entering directory `/root/psqlodbc-13.02.0000'
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I/usr/local/include -I/usr/include -I/usr/include/pgsql/internal -DUNICODE_SUPPORT -g -O2 -Wall -MT psqlodbcw_la-connection.lo -MD -MP -MF .deps/psqlodbcw_la-connection.Tpo -c -o psqlodbcw_la-connection.lo `test -f 'connection.c' || echo './'`connection.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I/usr/local/include -I/usr/include -I/usr/include/pgsql/internal -DUNICODE_SUPPORT -g -O2 -Wall -MT psqlodbcw_la-connection.lo -MD -MP -MF .deps/psqlodbcw_la-connection.Tpo -c connection.c -fPIC -DPIC -o .libs/psqlodbcw_la-connection.o
connection.c: In function 'handle_pgres_error':
connection.c:900:45: error: 'PG_DIAG_SCHEMA_NAME' undeclared (first use in this function)
errschemaname = PQresultErrorField(pgres, PG_DIAG_SCHEMA_NAME);
^
connection.c:900:45: note: each undeclared identifier is reported only once for each function it appears in
connection.c:901:44: error: 'PG_DIAG_TABLE_NAME' undeclared (first use in this function)
errtablename = PQresultErrorField(pgres, PG_DIAG_TABLE_NAME);
^
connection.c:902:45: error: 'PG_DIAG_COLUMN_NAME' undeclared (first use in this function)
errcolumnname = PQresultErrorField(pgres, PG_DIAG_COLUMN_NAME);
^
connection.c:903:47: error: 'PG_DIAG_DATATYPE_NAME' undeclared (first use in this function)
errdatatypename = PQresultErrorField(pgres, PG_DIAG_DATATYPE_NAME);
^
make[1]: *** [psqlodbcw_la-connection.lo] Fehler 1
make[1]: Leaving directory `/root/psqlodbc-13.02.0000'
make: *** [all] Fehler 2
Wondering where to declare these undeclared idenifiers. What does it want to know here? How to solve it?

No answer to the problem of not being able to compile - but an answer to the original problem that the original packages didn't work for UTF8:
https://www.postgresql.org/message-id/OFA166DBFD.19742AF7-ONC1257B6A.005692E6-C1257B6A.0056F890#lladro.net
This has to be done in the database as sysdba:
select fds_class_name from HS_FDS_CLASS;
select * from hs_class_caps where upper(CAP_DESCRIPTION) like '%NCHAR%' and FDS_CLASS_NAME ='ODBC12.1.0.1.0_0017';
exec DBMS_HS.ALTER_CLASS_CAPS('ODBC12.1.0.1.0_0017' , 564, 'ODBC12.1.0.1.0_0017', 564,131071, NULL, NULL);

Related

MySQL Workbench for PostgreSQL - ./psqlodbc.h:41:10: fatal error: 'sql.h' file not found

I am trying to connect to a Postgres db trough MySQL Workbench.
Following the documentation we need to install a driver for psql in our machine.
I am running a MacOS Big Sur 11.2.3.
After run CFLAGS="-arch i386 -arch x86_64" make I'm getting the following error:
/Library/Developer/CommandLineTools/usr/bin/make all-am
source='info.c' object='info.lo' libtool=yes \
depfile='.deps/info.Plo' tmpdepfile='.deps/info.TPlo' \
depmode=gcc3 /bin/sh ./depcomp \
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c -o info.lo `test -f 'info.c' || echo './'`info.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c info.c -MT info.lo -MD -MP -MF .deps/info.TPlo -fno-common -DPIC -o info.lo
In file included from info.c:19:
./psqlodbc.h:41:10: fatal error: 'sql.h' file not found
#include <sql.h>
^~~~~~~
1 error generated.
make[1]: *** [info.lo] Error 1
make: *** [all] Error 2
It seems that the 'sql.h' file is not found.
How to solve this issue?

Libtool - Mismatch version

I try to install USBIP on Centos 5.11 (Kernel 2.6.18-409.el5) but I always have this error when I type "make" :
make[1]: Entering directory "/root/Downloads/usbip-0.1.7/src"
Making all in lib
make[2]: Entering directory "/root/Downloads/usbip-0.1.7/src/lib"
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -Wall -W -Wstrict-prototypes -std=gnu99 -DUSBIDS_FILE='"/usr/local/share/usbip/usb.ids"' -g -O2 -MT libusbip_la-names.lo -MD -MP -MF ".deps/libusbip_la-names.Tpo" -c -o libusbip_la-names.lo "test -f "names.c" || echo './'"names.c; \
then mv -f ".deps/libusbip_la-names.Tpo" ".deps/libusbip_la-names.Plo"; else rm -f ".deps/libusbip_la-names.Tpo"; exit 1; fi
libtool: Version mismatch error. This is libtool 1.9b, but the
libtool: definition of this LT_INIT comes from an older release.
libtool: You should recreate aclocal.m4 with macros from libtool 1.9b
libtool: and run autoconf again.
make[2]: [libusbip_la-names.lo] Error 1
make[2]: Leaving directory "/root/Downloads/usbip-0.1.7/src/lib"
make[1]: [all-recursive] Error 1
make[1]: Leaving directory "/root/Downloads/usbip-0.1.7/src"
make: *** [all] Error 2
I saw several solution on forums, like "autoreconf -vfi" but it does not work for me.
I currently try to reinstall libtool to have the last version but I can't. When I type "yum remove libtool", I'm always able to type "libtool --version" :
[tuk#VM01 Downloads]# libtool --version
ltmain.sh (GNU libtool) 1.9b
Written by Gordon Matzigkeit <gord#gnu.ai.mit.edu>, 1996
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
And binaries are always here :
[tuk#VM01 Downloads]# find / -name "libtool*"
/opt/share/man/man1/libtoolize.1
/opt/share/man/man1/libtool.1
/opt/share/aclocal/libtool.m4
/opt/share/info/libtool.info-1
/opt/share/info/libtool.info-2
/opt/share/info/libtool.info
/opt/share/libtool
/opt/bin/libtool
/opt/bin/libtoolize
/usr/local/share/man/man1/libtoolize.1
/usr/local/share/man/man1/libtool.1
/usr/local/share/aclocal/libtool.m4
/usr/local/share/info/libtool.info-1
/usr/local/share/info/libtool.info-2
/usr/local/share/info/libtool.info
/usr/local/share/libtool
/usr/local/bin/libtool
/usr/local/bin/libtoolize
/usr/share/automake-1.9/am/libtool.am
Is there any solution fro me to install USBIP ? Thanks you
Solved !
I haved several binaries for libtool :
[root#SVSLOFLEX2 ~]# which -a libtool
/usr/local/bin/libtool
/usr/bin/libtool
The version of /usr/local/bin is the 1.9b (and it don't work)
I added this line to use another version of libtool (by default) :
export PATH=/usr/bin:$PATH
The version of /usr/bin is the 1.5.22, and it work, USBIP is now installed.

Installing Neovim through Linuxbrew on AWS

I'm trying to install neovim with linuxbrew on AWS, but I keep getting the following messages, and I can't figure it out :/.
/home/ec2-user/.linuxbrew/bin/libtool: line 10548: /usr/bin/gcc-4.8: No such file or directory
~/dotfiles$ brew install neovim
==> Installing neovim from neovim/neovim
==> Downloading https://github.com/neovim/neovim/archive/v0.1.4.tar.gz
Already downloaded: /home/ec2-user/.cache/Homebrew/neovim-0.1.4.tar.gz
==> Downloading https://github.com/libuv/libuv/archive/v1.8.0.tar.gz
Already downloaded: /home/ec2-user/.cache/Homebrew/neovim--libuv-1.8.0.tar.gz
==> Downloading https://github.com/msgpack/msgpack-c/archive/cpp-1.0.0.tar.gz
Already downloaded: /home/ec2-user/.cache/Homebrew/neovim--msgpack-1.0.0.tar.gz
==> Downloading https://raw.githubusercontent.com/neovim/deps/master/opt/LuaJIT-2.0.4.tar.gz
Already downloaded: /home/ec2-user/.cache/Homebrew/neovim--luajit-2.0.4.tar.gz
==> Downloading https://github.com/keplerproject/luarocks/archive/5d8a16526573b36d5b22aa74866120c998466697.tar.gz
Already downloaded: /home/ec2-user/.cache/Homebrew/neovim--luarocks-998466697.tar.gz
==> Downloading https://github.com/mauke/unibilium/archive/v1.2.0.tar.gz
Already downloaded: /home/ec2-user/.cache/Homebrew/neovim--unibilium-1.2.0.tar.gz
==> Downloading http://www.leonerd.org.uk/code/libtermkey/libtermkey-0.18.tar.gz
Already downloaded: /home/ec2-user/.cache/Homebrew/neovim--libtermkey-0.18.tar.gz
==> Downloading https://github.com/neovim/libvterm/archive/1b745d29d45623aa8d22a7b9288c7b0e331c7088.tar.gz
Already downloaded: /home/ec2-user/.cache/Homebrew/neovim--libvterm-7088.tar.gz
==> Downloading https://github.com/jemalloc/jemalloc/releases/download/4.0.2/jemalloc-4.0.2.tar.bz2
Already downloaded: /home/ec2-user/.cache/Homebrew/neovim--jemalloc-4.0.2.tar.bz2
==> Building third-party dependencies.
==> cmake ../third-party -DUSE_BUNDLED_BUSTED=OFF -DUSE_BUNDLED_LUV=OFF -DUSE_EXISTING_SRC_DIR=ON -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG -DCMAKE_INSTALL_PREFIX=/home/ec2-user/
==> make VERBOSE=1
Last 15 lines from /home/ec2-user/.cache/Homebrew/Logs/neovim/02.make:
libtool: compile: /home/ec2-user/.linuxbrew/bin/gcc-5 -I. -Wall -std=c99 -fPIC -c uninames.c -fPIC -DPIC -o .libs/uninames.o
libtool: compile: /home/ec2-user/.linuxbrew/bin/gcc-5 -I. -Wall -std=c99 -fPIC -c uninames.c -o uninames.o >/dev/null 2>&1
libtool --mode=compile --tag=CC /home/ec2-user/.linuxbrew/bin/gcc-5 -I. -DTERMINFO_DIRS='"/etc/terminfo:/lib/terminfo:/usr/share/terminfo:/usr/lib/terminfo:/usr/local/share/terminfo:/usr/local/lib/terminfo"' -Wall -std=c99 -fPIC -o uniutil.lo -c uniutil.c
libtool: compile: /home/ec2-user/.linuxbrew/bin/gcc-5 -I. -DTERMINFO_DIRS=\"/etc/terminfo:/lib/terminfo:/usr/share/terminfo:/usr/lib/terminfo:/usr/local/share/terminfo:/usr/local/lib/terminfo\" -Wall -std=c99 -fPIC -c uniutil.c -fPIC -DPIC -o .libs/uniutil.o
libtool: compile: /home/ec2-user/.linuxbrew/bin/gcc-5 -I. -DTERMINFO_DIRS=\"/etc/terminfo:/lib/terminfo:/usr/share/terminfo:/usr/lib/terminfo:/usr/local/share/terminfo:/usr/local/lib/terminfo\" -Wall -std=c99 -fPIC -c uniutil.c -o uniutil.o >/dev/null 2>&1
libtool --mode=link --tag=CC /home/ec2-user/.linuxbrew/bin/gcc-5 -L/home/ec2-user/.linuxbrew/lib -Wl,--dynamic-linker=/home/ec2-user/.linuxbrew/lib/ld.so -Wl,-rpath,/home/ec2-user/.linuxbrew/lib -rpath '/tmp/neovim-20160518-12137-13p0ite/neovim-0.1.4/deps-build/usr/lib' -version-info 3:0:3 -o libunibilium.la unibilium.lo uninames.lo uniutil.lo
libtool: link: /usr/bin/gcc-4.8 -shared -fPIC -DPIC .libs/unibilium.o .libs/uninames.o .libs/uniutil.o -L/home/ec2-user/.linuxbrew/lib -Wl,--dynamic-linker=/home/ec2-user/.linuxbrew/lib/ld.so -Wl,-rpath -Wl,/home/ec2-user/.linuxbrew/lib -Wl,-soname -Wl,libunibilium.so.0 -o .libs/libunibilium.so.0.3.0
/home/ec2-user/.linuxbrew/bin/libtool: line 10548: /usr/bin/gcc-4.8: No such file or directory
make[3]: *** [libunibilium.la] Error 127
make[3]: Leaving directory `/tmp/neovim-20160518-12137-13p0ite/neovim-0.1.4/deps-build/build/src/unibilium'
make[2]: *** [build/src/unibilium-stamp/unibilium-build] Error 2
make[2]: Leaving directory `/tmp/neovim-20160518-12137-13p0ite/neovim-0.1.4/deps-build'
make[1]: *** [CMakeFiles/unibilium.dir/all] Error 2
make[1]: Leaving directory `/tmp/neovim-20160518-12137-13p0ite/neovim-0.1.4/deps-build'
make: *** [all] Error 2
READ THIS: https://github.com/Linuxbrew/brew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
https://github.com/neovim/homebrew-neovim/issues
These open issues may also help:
Neovim Fails to Install on Standalone Linuxbrew: libmsgpack.so Error https://github.com/neovim/homebrew-neovim/issues/156
Neovim failing to build with homebrew on OS X 10.9.5 https://github.com/neovim/homebrew-neovim/issues/153
Can't install via homebrew-neovim if luarocks path is set explicitly https://github.com/neovim/homebrew-neovim/issues/149
Error when trying to install neovim in my Ubuntu 14.04 virtual machine. https://github.com/neovim/homebrew-neovim/issues/134
I had the same issue. It is a problem of the libtool formula
https://github.com/Linuxbrew/homebrew-core/issues/376
I fixed by doing
brew update
brew reinstall -s libtool
brew install neovim/neovim/neovim

how to build pipeline_kafka extension

i'm currently trying to compile the pipeline_kafka extension from Github to add it to my pipelinedb instance but i'm running in a problem neither i nor google seems to be able to solve.
when i execute make command i get the following error
stc#vm:~/pipeline_kafka$ make gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -I/usr/include/mit-krb5 -fPIC -pie -DLINUX_OOM_SCORE_ADJ=0 -fno-omit-frame-pointer -fpic -I. -I./ -I/usr/include/postgresql/9.4/server -I/usr/include/postgresql/internal -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.6 -c -o pipeline_kafka.o pipeline_kafka.c pipeline_kafka.c:23:40: fatal error: catalog/pipeline_stream_fn.h: No such file or directory #include "catalog/pipeline_stream_fn.h" ^ compilation terminated. : recipe for target 'pipeline_kafka.o' failed make: *** [pipeline_kafka.o] Error 1
does anyone has an idea what to do? I'm running on debian 8.
Does anyone know why this extension is not part of pipelinedb anymore?
cheers and thanks in advance
the reason for the error is my entire approach towards using/installing pipelinedb and pipeline_kafka.
the following script worked for me on a standard Debian 8 installation. Maybe it helps.
Download and install PipelineDB
wget -O pipelinedb_install_package "https://www.pipelinedb.com/download/0.9.1/debian8"
sudo dpkg -i pipelinedb_install_package
mkdir ~/logs
pipeline-init -D ~/data/pipelinedb
pipeline-ctl -D ~/data/pipelinedb -l ~/logs/pipelinedb.log start
sleep 5.0
pipeline pipeline
Download and install pipeline_kafka extension
sudo apt-get install git gcc g++ zlib1g-dev
mkdir ~/git
git clone https://github.com/edenhill/librdkafka.git ~/git/librdkafka
git clone https://github.com/pipelinedb/pipeline_kafka.git >~/git/pipeline_kafka
cd ~/git/librdkafka
./configure --prefix=/usr
make
sudo make install
cd ~/git/pipeline_kafka
./configure
make
sudo make install
pipeline pipeline -c "CREATE EXTENSION pipeline_kafka;"
sed -i 's/#shared_preload_libraries/shared_preload_libraries/' ~/data/pipelinedb/pipelinedb.conf
sed -i "s/shared_preload_libraries = ''/shared_preload_libraries=pipeline_kafka/" ~/data/pipelinedb/pipelinedb.conf

Install Perl Image::Magick on Fedora

I'm installing Image::Magick via cpan and I keep getting this error. I've tried with and without forcing it. I've trimmed the install log. I've read something about missing an ImageMagick.h file but don't exactly know anything other then that. Apparently this has been a common problem since 2007.....
[gandalf#Durmstrang ~]$ cpan -if Image::Magick
"/usr/bin/perl" "/usr/share/perl5/vendor_perl/ExtUtils/xsubpp" -typemap "/usr/share/perl5/ExtUtils/typemap" -typemap "typemap" Magick.xs > Magick.xsc && mv Magick.xsc Magick.c
gcc -c -I/usr/local/include/ImageMagick-6 -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/libxml2 -I"/usr/include/ImageMagick-6" -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/freetype2 -g -O2 -Wall -pthread -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DVERSION=\"6.89\" -DXS_VERSION=\"6.89\" -fPIC "-I/usr/lib64/perl5/CORE" -D_LARGE_FILES=1 -DHAVE_CONFIG_H Magick.c
Magick.xs: In function ‘XS_Image__Magick_ComplexImages’:
Magick.xs:3475:5: error: unknown type name ‘ComplexOperator’
ComplexOperator
^
Magick.xs:3510:8: error: ‘UndefinedComplexOperator’ undeclared (first use in this function)
op=UndefinedComplexOperator;
^
Magick.xs:3510:8: note: each undeclared identifier is reported only once for each function it appears in
Magick.xs:3516:31: error: ‘MagickComplexOptions’ undeclared (first use in this function)
in=ParseCommandOption(MagickComplexOptions,MagickFalse,(char *)
^
Magick.xs:3524:13: error: ‘ComplexOperator’ undeclared (first use in this function)
op=(ComplexOperator) in;
^
Magick.xs:3524:30: error: expected ‘;’ before ‘in’
op=(ComplexOperator) in;
^
Magick.xs:3548:38: error: expected ‘;’ before ‘in’
op=(ComplexOperator) in;
^
Magick.xs:3563:5: warning: implicit declaration of function ‘ComplexImages’ [-Wimplicit-function-declaration]
image=ComplexImages(image,op,exception);
^
Magick.xs:3563:10: warning: assignment makes pointer from integer without a cast [enabled by default]
image=ComplexImages(image,op,exception);
^
Magick.xs: In function ‘XS_Image__Magick_Mogrify’:
Magick.xs:9824:11: warning: implicit declaration of function ‘RotationalBlurImageChannel’ [-Wimplicit-function-declaration]
image=RotationalBlurImageChannel(image,channel,geometry_info.rho,
^
Magick.xs:9824:16: warning: assignment makes pointer from integer without a cast [enabled by default]
image=RotationalBlurImageChannel(image,channel,geometry_info.rho,
^
Magick.xs:10895:11: warning: implicit declaration of function ‘CannyEdgeImage’ [-Wimplicit-function-declaration]
image=CannyEdgeImage(image,geometry_info.rho,geometry_info.sigma,
^
Magick.xs:10895:16: warning: assignment makes pointer from integer without a cast [enabled by default]
image=CannyEdgeImage(image,geometry_info.rho,geometry_info.sigma,
^
Magick.xs:10916:11: warning: implicit declaration of function ‘HoughLineImage’ [-Wimplicit-function-declaration]
image=HoughLineImage(image,(size_t) geometry_info.rho,(size_t)
^
Magick.xs:10916:16: warning: assignment makes pointer from integer without a cast [enabled by default]
image=HoughLineImage(image,(size_t) geometry_info.rho,(size_t)
^
Magick.xs:10939:11: warning: implicit declaration of function ‘MeanShiftImage’ [-Wimplicit-function-declaration]
image=MeanShiftImage(image,(size_t) geometry_info.rho,(size_t)
^
Magick.xs:10939:16: warning: assignment makes pointer from integer without a cast [enabled by default]
image=MeanShiftImage(image,(size_t) geometry_info.rho,(size_t)
^
make: *** [Magick.o] Error 1
JCRISTY/PerlMagick-6.89-1.tar.gz
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
The problem is that CPAN doesn't know about non-Perl dependencies.
The Perl Image::Magick module is just a wrapper around a C library. You'll need that library installed before you can build the Perl module.
$ sudo yum install ImageMagick
It also probably need ImageMagick's development package.
$ sudo yum install ImageMagick-devel
But it's probably easier to just install the RPM version that has already been packaged for Fedora (that will automatically pull in any other requirements).
$ sudo yum install ImageMagick-perl
In Fedora, CentOS, Ubuntu and more there have been this type of challenge in geting Image::Magick to install via the cpan program, and there have been sensitivities about the install-script for Image::Magick for a couple of years, it seems (if one searches around). This is so both for on desktop Linux and, even more so, via Apache cpanel. There are recipies but at least at Ubuntu, they have not been solving all issues. Sometimes, to get it right, one must first do removal of relevant libraries using ImageMagick to reset the links. All the proposed solutions center around installing other things before using 'cpan'. However, the best approach, I find, isn't at all to compile from source but to install the binary ImageMagick application when that is available, and relevant libraries before and after cpan, like this--in Ubuntu, but adapted for Fedora it should be similar or much the same:
sudo apt-get install perlmagick
sudo apt-get install ImageMagick
sudo cpan install Image::Magick
sudo apt-get install libperl-dev
For the sake of completeness, if one cannot find the right binary, one must take care to preinstall all relevant libraries as indicated on http://www.imagemagick.org and then this set of commands will replace the line#2 above, when performed after 'sudo -i' (in Ubuntu) or equivalent in Fedora, inside a temporary folder:
wget http://www.imagemagick.org/download/ImageMagick.tar.gz
tar xvfz ImageMagick.tar.gz
cd Imag*
./configure --with-perl
make
make install
When this installation is complete, proceed with line#3 above. Adapt the beginning of the command to the form that fits with other forms of linuxes. After this, a perl program having use Image::Magick; in its start should be able to do such as resizing of jpg images etc flawlessly.