ERROR: dependencies ‘mnormt’, ‘pbivnorm’, ‘quadprog’, ‘numDeriv’ are not available for package ‘lava

1,505 views
Skip to first unread message

R McLaren

unread,
Jan 27, 2017, 6:03:38 PM1/27/17
to lavaan
Hi

I have been rebuilding my setup for R and this error message appears. 

ERROR: dependencies ‘mnormt’, ‘pbivnorm’, ‘quadprog’, ‘numDeriv’ are not available for package ‘lavaan’
* removing ‘/home/ubuntu/R/x86_64-pc-linux-gnu-library/3.3/lavaan’

My question is, Is there a solution path or will this require another uninstall/reinstall? 

Thanks,  

Rick

kma...@aol.com

unread,
Jan 28, 2017, 9:24:45 AM1/28/17
to lavaan
Rick,
Thanks for posting this question.  I am a Linux newbie encountering the same problem under Mint 18.  The error that I am getting is that R cannot find gfortran when it attempts to build these packages.  One person got around the problem by copying gfortran to where R was looking but I have not located gfortran to copy from.  So, I do not have an answer but I can confirm that the problem is not unique to your machine.  If you scroll up through the error messages, does your problem also trace to not finding gfortran?

Keith
------------------------
Keith A. Markus
John Jay College of Criminal Justice, CUNY
http://jjcweb.jjay.cuny.edu/kmarkus
Frontiers of Test Validity Theory: Measurement, Causation and Meaning.
http://www.routledge.com/books/details/9781841692203/


R MacLaren

unread,
Jan 28, 2017, 12:32:22 PM1/28/17
to lav...@googlegroups.com
Hi Keith and thanks for the note. Unfortunately after I successfully uninstalled R (i.e., after considerable grief), given Ubuntu was nagging me for updates, I rebooted and the error messages were lost. I did read the error messages and I didn't encode whether or not gfortran was implicated. 

Of the error messages I remember, the 'car' file was holding fast and was resistant to extinction, and out of date. The continual message I kept getting was (to my amusement) kind of a scolding reminder to me that I'd neglected to accept updates. 

Presently I'm hoping to install R again, and I'll wait for folks to possibly reply to another thread just in case the standard R package is not the preferred package for using lavaan, sem, and EGA/MGM tools. 

I'll keep my eyes peeled, during the install process, for signs of fortran issues and I'll post here if I find any that may be relevant to your situation.

Good luck with your research. 

Rick 



--
You received this message because you are subscribed to a topic in the Google Groups "lavaan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lavaan/U4GA2tsMk6w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lavaan+unsubscribe@googlegroups.com.
To post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.

R McLaren

unread,
Jan 28, 2017, 2:29:22 PM1/28/17
to lavaan
btw I don't think the message I reported on in my last note was from lavaan, I believe it came from the R/linux programming sphere.  

Yves Rosseel

unread,
Jan 28, 2017, 3:14:46 PM1/28/17
to lav...@googlegroups.com
I sounds like you need to install gcc-gfortran. One would think that a
distro like Mint would do that out of the box (or at least when R is
installed).

As a long-term linux user (using Arch linux), I prefer to install R from
source. This is the script I use for the current version of R:

#!/bin/sh
VERSION=3.3.2
cd /tmp
wget http://cran.at.r-project.org/src/base/R-3/R-$VERSION.tar.gz
tar xfz R-$VERSION.tar.gz
cd R-$VERSION
./configure --enable-memory-profiling --enable-R-shlib
make
make install


You need to install the basic compilation tools (make, gcc,
gcc-gfortran, ...) first, but once this is in place, it is bullet-proof.

Yves.

R MacLaren

unread,
Jan 28, 2017, 5:05:37 PM1/28/17
to lav...@googlegroups.com
Thanks Yves I wasn't aware my installation was mint - I don't recall if I mentioned the OS is Ubuntu 16.04 LTS. 

I'll follow up with the script you sent me. 

It seems when Ubuntu requests updates, it doesn't appear to tell or warn me in perhaps harsh enough terms (i.e., like !!!) that my system is upgrading to a new name like frosty flakes rotton turnip or mint (or whatever is the new name) for upgrades. When prompted by Ubuntu for these revisions, I'm averse to accepting them for fear that they'll blow up a perfectly functioning OS and stats gear, but I think I've accepted upgrades that don't jive with my older versions. 

My hypothesis is that I accidentally accepted the rotton turnip upgrade, when what I really need is mint. 

R McLaren

unread,
Jan 28, 2017, 5:17:04 PM1/28/17
to lavaan
I just got an error message - my system is not accepting updates. And it is asking me to accept untrusted packages, which I also don't wish to do if I don't know they're safe. Are these usually or most always safe? 

Rick 

kma...@aol.com

unread,
Jan 28, 2017, 6:08:10 PM1/28/17
to lavaan
Rick and Yves,
Rick, I am the one using Mint.  However, it is based on Ubuntu, which you are apparently using.

I tried this:
sudo apt-get install gfortran

It solved 3/4 of the problem but quadprog is still not working:

>>>

/usr/share/R/share/make/shlib.mk:6: recipe for target 'quadprog.so' failed


make: *** [quadprog.so] Error 1

ERROR: compilation failed for package ‘quadprog’

* removing ‘/home/kmarkus/.rkward/library/quadprog’

ERROR: dependency ‘quadprog’ is not available for package ‘lavaan’

* removing ‘/home/kmarkus/.rkward/library/lavaan’

>>>


Yves, can you point me to more specific instructions about what other tools I need to install and how to install them?  This is literally my 4th day using Linux.  So, I'm sorry that I do not have much background knowledge to work with.  I'm sure this must be a pretty basic question.

Thanks,

kma...@aol.com

unread,
Jan 28, 2017, 6:16:14 PM1/28/17
to lavaan

Actually, I missed an earlier message that seems informative:


/usr/bin/ld: cannot find -lblas

collect2: error: ld returned 1 exit status


Is lblas something that I also need to install?

R McLaren

unread,
Jan 28, 2017, 6:50:52 PM1/28/17
to lavaan
I will mirror your method presently, thanks.  

Rick 

R MacLaren

unread,
Jan 28, 2017, 7:00:17 PM1/28/17
to lav...@googlegroups.com
Keith did you install fortran from root? 



R MacLaren

unread,
Jan 28, 2017, 7:13:36 PM1/28/17
to lav...@googlegroups.com
The reason I ask is because I found files accessible only through root, that were blocking my uninstall, so I sent the commands from root #. The same command executed outside of the # environment were of no effect in my uninstall - reinstall instance.  


R McLaren

unread,
Jan 28, 2017, 7:23:48 PM1/28/17
to lavaan
Ok so just to confirm, you performed the command sudo apt-get install gfortran from which directory and did you have a $ > or # prompt? 

Rick 

R McLaren

unread,
Jan 28, 2017, 7:26:25 PM1/28/17
to lavaan
sudo apt-get install gfortran

from $

gets me 

ubuntu@ubuntu-Satellite-L775D:~$ sudo apt-get install gfortran
[sudo] password for ubuntu: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gfortran is already the newest version (4:5.3.1-1ubuntu1).
gfortran set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 113 not upgraded.
ubuntu@ubuntu-Satellite-L775D:~$ ^C
ubuntu@ubuntu-Satellite-L775D:~$ 

R

R MacLaren

unread,
Jan 28, 2017, 7:31:24 PM1/28/17
to lav...@googlegroups.com
And it is reversible without grief:

ubuntu@ubuntu-Satellite-L775D:~$ sudo apt-get remove gfortran
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  gfortran
0 upgraded, 0 newly installed, 1 to remove and 113 not upgraded.
After this operation, 15.4 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 472032 files and directories currently installed.)
Removing gfortran (4:5.3.1-1ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
ubuntu@ubuntu-Satellite-L775D:~$ ^C
ubuntu@ubuntu-Satellite-L775D:~$ ^C
ubuntu@ubuntu-Satellite-L775D:~$ 


R MacLaren

unread,
Jan 28, 2017, 8:39:12 PM1/28/17
to lav...@googlegroups.com
Hi Yves I thought I followed your script but I got this reply: 


2017-01-28 20:08:17 (481 KB/s) - ‘R-3.3.2.tar.gz.1’ saved [29440670/29440670]

ubuntu@ubuntu-Satellite-L775D:/tmp$ tar xfz R-$VERSION.tar.gz
ubuntu@ubuntu-Satellite-L775D:/tmp$ cd R-$VERSION
ubuntu@ubuntu-Satellite-L775D:/tmp/R-3.3.2$ ./configure --enable-memory-profiling --enable-R-shlib
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
loading site script './config.site'
loading build-specific script './config.site'
checking for pwd... /bin/pwd
checking whether builddir is srcdir... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking whether ln -s works... yes
checking for bison... no
checking for byacc... no
checking for ar... ar
checking for a BSD-compatible install... /usr/bin/install -c
checking for sed... /bin/sed
checking for which... /usr/bin/which
checking for less... /usr/bin/less
checking for gtar... no
checking for gnutar... no
checking for tar... /bin/tar
checking for tex... /usr/bin/tex
checking for pdftex... /usr/bin/pdftex
checking for pdflatex... /usr/bin/pdflatex
checking for makeindex... /usr/bin/makeindex
checking for texi2any... no
configure: WARNING: you cannot build info or HTML versions of the R manuals
checking for texi2dvi... no
checking for kpsewhich... /usr/bin/kpsewhich
checking for latex inconsolata package... missing
configure: WARNING: neither inconsolata.sty nor zi4.sty found: PDF vignettes and package manuals will not be rendered optimally
checking for unzip... /usr/bin/unzip
checking for zip... /usr/bin/zip
checking for gzip... /bin/gzip
checking for bzip2... /bin/bzip2
checking for firefox... no
checking for mozilla... no
checking for galeon... no
checking for opera... /usr/bin/opera
using default browser ... /usr/bin/opera
checking for acroread... no
checking for acroread4... no
checking for xdg-open... /usr/bin/xdg-open
checking for notangle... false
checking for realpath... /usr/bin/realpath
checking for pkg-config... /usr/bin/pkg-config
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether gcc needs -traditional... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking how to run the C preprocessor... gcc -E
checking for f95... f95
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether f95 accepts -g... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking whether __attribute__((visibility())) is supported... yes
checking whether gcc accepts -fvisibility... yes
checking whether f95 accepts -fvisibility... yes
checking for gcc... gcc
checking whether we are using the GNU Objective C compiler... no
checking whether gcc accepts -g... no
checking for Objective C++ compiler... trying some possibilities
checking whether g++ can compile ObjC++... no
checking whether  can compile ObjC++... no
no working ObjC++ compiler found
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... gawk
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for f95 option to produce PIC... -fPIC
checking if f95 PIC flag -fPIC works... yes
checking if f95 static flag -static works... yes
checking if f95 supports -c -o file.o... yes
checking if f95 supports -c -o file.o... (cached) yes
checking whether the f95 linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for cos in -lm... yes
checking for sin in -lm... yes
checking for dlopen in -ldl... yes
checking readline/history.h usability... no
checking readline/history.h presence... no
checking for readline/history.h... no
checking readline/readline.h usability... no
checking readline/readline.h presence... no
checking for readline/readline.h... no
checking for rl_callback_read_char in -lreadline... no
checking for main in -lncurses... no
checking for main in -ltermcap... no
checking for main in -ltermlib... no
checking for rl_callback_read_char in -lreadline... no
checking for history_truncate_file... no
configure: error: --with-readline=yes (default) and headers/libs are not available
ubuntu@ubuntu-Satellite-L775D:/tmp/R-3.3.2$ make
make: *** No targets specified and no makefile found.  Stop.
ubuntu@ubuntu-Satellite-L775D:/tmp/R-3.3.2$ make install
make: *** No rule to make target 'install'.  Stop.
ubuntu@ubuntu-Satellite-L775D:/tmp/R-3.3.2$ make install gcc
make: *** No rule to make target 'install'.  Stop.

I suspect make is installed but I'm not specifying the target, which I thought would be gcc. 

Is this printout as you would expect Yves? 

I'm concerned I didn't get the sequencing correct. 

Rick 

On Sat, Jan 28, 2017 at 3:14 PM, Yves Rosseel <yros...@gmail.com> wrote:

R MacLaren

unread,
Jan 28, 2017, 10:10:14 PM1/28/17
to lav...@googlegroups.com
I erred in the sequencing of gfortran, gcc, gcc-fortran, and the script - though the syntax make and make install didn't lead to success in this instance. I'll uninstall. 

R

On Sat, Jan 28, 2017 at 3:14 PM, Yves Rosseel <yros...@gmail.com> wrote:

Yves Rosseel

unread,
Jan 29, 2017, 4:34:24 AM1/29/17
to lav...@googlegroups.com
On 01/29/2017 02:39 AM, R MacLaren wrote:
> checking for texi2any... no
> configure: WARNING: you cannot build info or HTML versions of the R manuals
> checking for texi2dvi... no
> checking for kpsewhich... /usr/bin/kpsewhich
> checking for latex inconsolata package... missing
> configure: WARNING: neither inconsolata.sty nor zi4.sty found: PDF
> vignettes and package manuals will not be rendered optimally
> configure: error: --with-readline=yes (default) and headers/libs are not
> available

The last error is fatal: your linux system does not have the readline
libraries installed. You need to install this first.

Also (although not fatal), other missing parts are: texinfo, and some
extra fonts needed for the PDF manual (usually part of
texlive-fonts-extra or something similar).

How to install these components depends on your distribution. To get an
overview of *all* components you may ever need in the R system, see:

https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Essential-and-useful-other-programs-under-a-Unix_002dalike

Yves.

Yves Rosseel

unread,
Jan 29, 2017, 4:39:53 AM1/29/17
to lav...@googlegroups.com
On 01/29/2017 12:16 AM, kmarkus via lavaan wrote:
> Actually, I missed an earlier message that seems informative:
>
>
> /usr/bin/ld: cannot find -lblas

The source code of R includes blas, so if you are installing from
source, you should not need it. If you installed a binary version of R,
it may have omitted blas (because it want to give you options: there are
several blas libraries to choose from).

I am most familiar with installing everything from source (which is the
same procedure for all distributions). The necessary components are
listed here:

https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Installing-R-under-Unix_002dalikes

Yves.

kma...@aol.com

unread,
Jan 29, 2017, 6:39:37 PM1/29/17
to lavaan
Yves, Thanks.  That helps me get my bearings.

Rick, I used the $ prompt.  Here is the page from which I copied the command.

http://askubuntu.com/questions/837364/usr-local-bin-gfortran-command-not-found

R MacLaren

unread,
Jan 29, 2017, 7:52:53 PM1/29/17
to lav...@googlegroups.com
Yves thank you for your assistance.

I read the 'installing under the Unix look alike' as you suggested and using grep found 3 versions of gfortran. I ran these grep commands in sequence as the instructions require, and gfortran comes up first. However, because there exist 3 gfortrans, including one 'gfortran-5', does this pose a problem for the installation? I searched and found no explicit Ubuntu gcc-fortran on the Ubuntu boards. I concluded the installation could go ahead with the caveat that I add the libraries you suggested in sequence, and the problem appears to be gone. 

Thanks 

Rick

R McLaren

unread,
Feb 3, 2017, 11:52:18 AM2/3/17
to lavaan
Hi Keith and thanks for the link. I tried it and things are good here. I'm testing the system out presently. It is possible I'll still take my computer to my linux pro and reinstall the Ubuntu package or upgrate, and then do a complete reinstall of R. But if I can get through today without having R crash on me, I'll reconsider.  

Best Rick 

kma...@aol.com

unread,
May 19, 2017, 3:42:59 PM5/19/17
to lavaan
As a follow-up to this thread, I found a front-door path to installing lavaan as an alternative to the back-door path suggested by Yves.  I can only confirm this worked for me using Linux Mint.  However, I would expect it to work for any Debian branch distribution, including Ubuntu.  I am assuming that R base is already installed.

1. Use your package manager to install the following in Linux:
libssl-dev
libssh2-1-dev
Libclblas-dev (I cannot confirm that this one is necessary.)
Libblas-devs


2. Use R to install the following package:
devtools

3. Use R to install lavaan.
Reply all
Reply to author
Forward
0 new messages