Can't install ggplot2 at debian 7.6 in R - linux

Today i'm trying to install a good library for visualization and create graphics, named "ggplot2", but i actually have a problems with installation!
There what i have in output:
Installing package into ‘/home/hamsternik/R/x86_64-pc-linux-gnu-library/3.1’ (as ‘lib’ is unspecified)
also installing the dependencies ‘munsell’, ‘scales’, ‘testthat’
trying URL 'http://cran.rstudio.com/src/contrib/munsell_0.4.2.tar.gz' Content type 'application/x-gzip' length 91026 bytes (88 Kb) opened URL ==================================================
downloaded 88 Kb trying URL 'http://cran.rstudio.com/src/contrib/scales_0.2.4.tar.gz' Content type 'application/x-gzip' length 40093 bytes (39 Kb) opened URL ==================================================
downloaded 39 Kb trying URL 'http://cran.rstudio.com/src/contrib/testthat_0.8.1.tar.gz' Content type 'application/x-gzip' length 40777 bytes (39 Kb) opened URL ==================================================
downloaded 39 Kb trying URL 'http://cran.rstudio.com/src/contrib/ggplot2_1.0.0.tar.gz' Content type 'application/x-gzip' length 2351447 bytes (2.2 Mb) opened URL ==================================================
downloaded 2.2 Mb * installing source package ‘munsell’ ... ** package ‘munsell’ successfully unpacked and MD5 sums checked ** R ** inst ** preparing package for lazy loading Error : package ‘colorspace’ was built before R 3.0.0: please re-install it ERROR: lazy loading failed for package ‘munsell’ * removing ‘/home/hamsternik/R/x86_64-pc-linux-gnu-library/3.1/munsell’
Warning in install.packages : installation of package ‘munsell’ had non-zero exit status * installing source package ‘testthat’ ... ** package ‘testthat’ successfully unpacked and MD5 sums checked ** R ** inst ** preparing package for lazy loading Error : package ‘digest’ was built before R 3.0.0: please re-install it ERROR: lazy loading failed for package ‘testthat’ * removing ‘/home/hamsternik/R/x86_64-pc-linux-gnu-library/3.1/testthat’
Warning in install.packages : installation of package ‘testthat’ had non-zero exit status ERROR: dependency ‘munsell’ is not available for package ‘scales’ * removing ‘/home/hamsternik/R/x86_64-pc-linux-gnu-library/3.1/scales’
Warning in install.packages : installation of package ‘scales’ had non-zero exit status ERROR: dependency ‘scales’ is not available for package ‘ggplot2’ * removing ‘/home/hamsternik/R/x86_64-pc-linux-gnu-library/3.1/ggplot2’
Warning in install.packages : installation of package ‘ggplot2’ had non-zero exit status The downloaded source packages are in ‘/tmp/RtmpDEeNck/downloaded_packages’
I actually use a debian-stable system (v.7.6) and the next decision was to install "r-cran-ggplot2" in the console.
And when i install them, i think about i having this library, but when i write in Rstudio: library(ggplot2), i take next message: Error: package ‘ggplot2’ was built before R 3.0.0: please re-install it
But i have a the up-to-date version - 3.1.1!
I really don't find any good answers for that question! PLeas, help!

OK, problem is actually done!
All what i make - remove all packages, including 'R-cran-.*' and again install it, but not install all packages which i find by the search command in konsole. I install only r-base, next i install R studio. Thus i can straightforwardly install every package with dependencies and they will be actually installed!

Related

Unable to open '/boot/vmlinuz-5.x.x.x-generic.dpkg-new': Operation not permitted [Need solution without removing antivirus from system]

In the last couple of days, I have gone through some unmet dependencies issues while upgrading. I tried installing those packages separately but couldn't find a solution.
I know one solution that is to remove the antivirus from the system. But I'm not permitted to remove it. I am looking for another solution without removing the anti-virus from the system.
It shows while unpacking the package:
Preparing to unpack .../linux-image-5.11.0-44-generic_5.11.0-44.48~20.04.2_amd64.deb ...
Unpacking linux-image-5.11.0-44-generic (5.11.0-44.48~20.04.2) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-5.11.0-44-generic_5.11.0-44.48~20.04.2_amd64.deb (--unpack):
unable to open '/boot/vmlinuz-5.11.0-44-generic.dpkg-new': Operation not permitted
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-5.11.0-44-generic_5.11.0-44.48~20.04.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I tried auto clean, force install, --fix-broken.. all the possible ways found in the forums.
For sudo apt --fix-broken install:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
bnd java-wrappers libbindex-java libcommons-codec-java
libcommons-collections3-java libcommons-compress-java libcommons-lang-java
libdd-plist-java libfelix-framework-java libfelix-gogo-runtime-java
libfelix-osgi-obr-java libfelix-resolver-java libfindbugs-java
libgoogle-gson-java libgradle-core-java libgradle-plugins-java
libhttpclient-java libhttpcore-java libjarjar-java libjatl-java
libjavaewah-java libjcifs-java libjcip-annotations-java
libjformatstring-java libjgit-java libjna-java libjna-jni libjs-jquery
libjsoup-java libkryo-java libminlog-java libnative-platform-java
libnative-platform-jni libnekohtml-java libobjenesis-java
libosgi-annotation-java libosgi-compendium-java libosgi-core-java
libplexus-container-default-java libplexus-container-default1.5-java
libpolyglot-maven-java libreflectasm-java librhino-java libsimple-http-java
libwagon-http-java libxbean-reflect-java libxerces2-java
libxml-commons-external-java
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
linux-image-5.11.0-44-generic
Suggested packages:
fdutils linux-doc | linux-hwe-5.11-source-5.11.0 linux-hwe-5.11-tools
The following NEW packages will be installed:
linux-image-5.11.0-44-generic
0 upgraded, 1 newly installed, 0 to remove and 19 not upgraded.
4 not fully installed or removed.
Need to get 0 B/11.5 MB of archives.
After this operation, 11.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 261995 files and directories currently installed.)
Preparing to unpack .../linux-image-5.11.0-44-generic_5.11.0-44.48~20.04.2_amd64
.deb ...
Unpacking linux-image-5.11.0-44-generic (5.11.0-44.48~20.04.2) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-5.11.0-44-gen
eric_5.11.0-44.48~20.04.2_amd64.deb (--unpack):
unable to open '/boot/vmlinuz-5.11.0-44-generic.dpkg-new': Operation not permit
ted
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-5.11.0-44-generic_5.11.0-44.48~20.04.2_amd6
4.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
It's annoying and I cannot install any other packages.
Any suggestions on how can I fix that?
Here is the solution that works for me:
Basically, Antivirus prevents the installation of the packages as my system has already one (McAfee agent).
First of all, I checked the status of the antivirus with the following commands if it is running or not:
# /opt/McAfee/ens/tp/init/mfetpd-control.sh status
# /opt/McAfee/ens/esp/init/mfeespd-control.sh status
If it is running then stop the services with these:
# /opt/McAfee/ens/tp/init/mfetpd-control.sh stop
# /opt/McAfee/ens/esp/init/mfeespd-control.sh stop
Then check the status again if it is stopped or not. If stopped then I started necessary updates and required installations by this:
sudo apt --fix-broken install
Finally, I started the antivirus again by these:
# /opt/McAfee/ens/esp/init/mfeespd-control.sh start
# /opt/McAfee/ens/tp/init/mfetpd-control.sh start
Reference: https://kc.mcafee.com/corporate/index?page=content&id=KB88223

installing php56w-gd error

I have installed PHP 5.6 in an amazon Instance in AWS.
PHP 5.6.22 (cli) (built: Jun 1 2016 21:46:41)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
I needed to install a module php56w-gd for image processing. However upon doing so when I run php I encounter this warnings.
PHP Warning: Module 'calendar' already loaded in Unknown on line 0
PHP Warning: Module 'curl' already loaded in Unknown on line 0
PHP Warning: Module 'fileinfo' already loaded in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/5.6/modules/gd.so' - /usr/lib64/php/5.6/modules/gd.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Module 'gettext' already loaded in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/5.6/modules/gmp.so' - /usr/lib64/php/5.6/modules/gmp.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Module 'iconv' already loaded in Unknown on line 0
PHP Warning: Module 'json' already loaded in Unknown on line 0
PHP Warning: Module 'shmop' already loaded in Unknown on line 0
PHP Warning: Module 'SimpleXML' already loaded in Unknown on line 0
PHP Warning: Module 'sockets' already loaded in Unknown on line 0
PHP Warning: Module 'tokenizer' already loaded in Unknown on line 0
PHP Warning: Module 'xml' already loaded in Unknown on line 0
PHP Warning: Module 'zip' already loaded in Unknown on line 0
I tried to uninstall it and reinstall but the same issue continues. The php56w-gd is also not working properly because the gd.so file is nowhere found.
Heres what I did to install the extension
yum install php56w-gd
Loaded plugins: priorities, update-motd, upgrade-helper
Resolving Dependencies
--> Running transaction check
---> Package php56w-gd.x86_64 0:5.6.22-1.w6 will be installed
--> Processing Dependency: php56w-common(x86-64) = 5.6.22-1.w6 for package: php56w-gd-5.6.22-1.w6.x86_64
--> Running transaction check
---> Package php56w-common.x86_64 0:5.6.22-1.w6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
====================================================================================================================================================================
Package Arch Version
====================================================================================================================================================================
Installing:
php56w-gd x86_64 5.6.22-1.w6
Installing for dependencies:
php56w-common x86_64 5.6.22-1.w6
Transaction Summary
====================================================================================================================================================================
Install 1 Package (+1 Dependent package)
Total download size: 1.4 M
Installed size: 9.1 M
Is this ok [y/d/N]: y
Downloading packages:
(1/2): php56w-common-5.6.22-1.w6.x86_64.rpm
(2/2): php56w-gd-5.6.22-1.w6.x86_64.rpm
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : php56w-common-5.6.22-1.w6.x86_64
warning: /etc/php.ini created as /etc/php.ini.rpmnew
Installing : php56w-gd-5.6.22-1.w6.x86_64
Verifying : php56w-gd-5.6.22-1.w6.x86_64
Verifying : php56w-common-5.6.22-1.w6.x86_64
Installed:
php56w-gd.x86_64 0:5.6.22-1.w6
Dependency Installed:
php56w-common.x86_64 0:5.6.22-1.w6
Complete!
Please share your thoughts.
Thanks!
You must edit your php.ini (or extensions.ini) file and comment-out the extensions that are already compiled-in.
To see which extensions are compiled-in to your PHP binary, run:
php -m

dependency error in R package

Everytime I give the command for any package, in this case for ggplot2, I get this after a few minutes. I am missing something, but can't figure out what. Thanks in advance!
ERROR: dependency ‘plyr’ is not available for package ‘reshape2’
* removing ‘/home/cj/R/x86_64-pc-linux-gnu-library/2.14/reshape2’
Warning in install.packages :
installation of package ‘reshape2’ had non-zero exit status
ERROR: dependency ‘plyr’ is not available for package ‘scales’
* removing ‘/home/cj/R/x86_64-pc-linux-gnu-library/2.14/scales’
Warning in install.packages :
installation of package ‘scales’ had non-zero exit status
ERROR: dependencies ‘plyr’, ‘reshape2’, ‘scales’ are not available for package ‘ggplot2’
* removing ‘/home/cj/R/x86_64-pc-linux-gnu-library/2.14/ggplot2’
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
The downloaded packages are in
‘/tmp/RtmpAXVGC6/downloaded_packages’
You are on R 2.14. Please please PLEASE upgrade to something from the last few years -- preferably from the current year such as R 3.2.0, 3.2.1 or the recently-release 3.2.2.
Simply put, you are being unreasonable in trying to expect that current and well-maintained archived for users of the current versions should also work with versions released that many years ago.

Can't install the caret package in R (in my Linux machine)

I am facing the following errors while trying to install the caret package in R.
g++: error: /tmp/Rtmp2Tos7n/R.INSTALL2e6e30153a74/nloptr/nlopt-2.4.2/lib/libnlopt_cxx.a:
No such file or directory make: *** [nloptr.so] Error 1
ERROR: compilation failed for package ‘nloptr’
* removing ‘/rmt/csfiles/pgrads/mava290/R/x86_64-suse-linux-gnu-library/3.1/nloptr’
Warning in install.packages :
installation of package ‘nloptr’ had non-zero exit status
ERROR: dependency ‘nloptr’ is not available for package ‘lme4’
* removing ‘/rmt/csfiles/pgrads/mava290/R/x86_64-suse-linux-gnu-library/3.1/lme4’
Warning in install.packages :
installation of package ‘lme4’ had non-zero exit status
ERROR: dependency ‘lme4’ is not available for package ‘pbkrtest’
* removing ‘/rmt/csfiles/pgrads/mava290/R/x86_64-suse-linux-gnu-library/3.1/pbkrtest’
Warning in install.packages :
installation of package ‘pbkrtest’ had non-zero exit status
ERROR: dependency ‘lme4’ is not available for package ‘BradleyTerry2’
* removing ‘/rmt/csfiles/pgrads/mava290/R/x86_64-suse-linux-gnu-library/3.1/BradleyTerry2’
Warning in install.packages :
installation of package ‘BradleyTerry2’ had non-zero exit status
ERROR: dependency ‘pbkrtest’ is not available for package ‘car’
* removing ‘/rmt/csfiles/pgrads/mava290/R/x86_64-suse-linux-gnu-library/3.1/car’
Warning in install.packages :
installation of package ‘car’ had non-zero exit status
ERROR: dependencies ‘car’, ‘BradleyTerry2’ are not available for package ‘caret’
* removing ‘/rmt/csfiles/pgrads/mava290/R/x86_64-suse-linux-gnu-library/3.1/caret’
Warning in install.packages :
installation of package ‘caret’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpG9dYqn/downloaded_packages’
I looked into this other question that had a similar problem
Dependency issue while installing caret package in R
The solution for this problem was to install each of the dependencies first, but they all had the same error message. For example:
>install.packages('nloptr')
g++: error: /tmp/RtmpgEn54A/R.INSTALL7015350f0d03/nloptr/nlopt-2.4.2/lib/libnlopt_cxx.a: No such file or directory
make: *** [nloptr.so] Error 1
ERROR: compilation failed for package ‘nloptr’
* removing ‘/rmt/csfiles/pgrads/mava290/R/x86_64-suse-linux-gnu-library/3.1/nloptr’
Warning in install.packages :
installation of package ‘nloptr’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpG9dYqn/downloaded_packages’
I also tried changing the repos ie. install.packages('caret', repos='http://cran.rstudio.com/') but it dint work either.
My session info is given below:
> sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-suse-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8
[5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8
[7] LC_PAPER=en_GB.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_3.1.2
I recently encountered the problem with nlopt as well. It was easily solved by installing nlopt-devel and its associated dependencies from YaST (or your preferred package manager).
I was hoping to add a comment first. On Jan 28, 2015, there was an addition to the nloptr package in github that possibly broke the compilation. I used a workaround by installing from an older version with the command
install.packages("http://cran.r-project.org/src/contrib/Archive/nloptr/nloptr_1.0.0.tar.gz",
repos=NULL, type="source")
As mentioned in this R help forum:
http://r.789695.n4.nabble.com/can-t-install-rugarch-and-nloptr-packages-in-R-3-01-opensuse-linux-td4669649.html
add the line to the src/Makevars file
mv .libs lib; \
between
make install; \
ls | grep -v ^include$$ | grep -v ^lib$$ | xargs rm -rf; \
This will remove the compilation error and you would be able to install nloptr package. I have tested this for nloptr_1.0.0.tar.gz .
I solve this issue by installing first "car" from synaptic (use filter with "cran-car").
And then I install "caret" with rstudio but I guess it will work also for R.
Hope it helps,
Regards

Cabal install complains "<built-in>:0:4: lexical error (UTF-8 decoding error)"

I am using Windows 7 with locale zh_CN and ghc-7.0.4
Default code page of the cmd.exe is 936.
> cabal install ghc-mod
Resolving dependencies...
Configuring ghc-syb-utils-0.2.1.0...
Preprocessing library ghc-syb-utils-0.2.1.0...
Building ghc-syb-utils-0.2.1.0...
<built-in>:0:4: lexical error (UTF-8 decoding error)
cabal: Error: some packages failed to install:
ghc-mod-1.10.7 depends on ghc-syb-utils-0.2.1.0 which failed to install.
ghc-syb-utils-0.2.1.0 failed during the building phase. The exception was:
ExitFailure 1
I have tried change code page and re-install again, but get the same output.
> chcp 65001
> cabal install ghc-mod
Some packages can be built successfully:
xml-1.3.12 textmath-0.6.0.3 tagsoup-0.12.6
Some packages would fail:
temporary-1.1.2.3 utf8-string-0.3.7 pandoc-types-1.9.0.2 json-0.5
I encountered the same problem.
I don't know if the cause is the same, but try
set LANG=C
before you run cabal. In my case, that fixed the problem.

Resources