我花了大约一个小时的时间来调试它,但是我认为最好假设除了brew install r
和install.packages("tidycensus")
以及其他一些软件包以外,我没有尝试过其他任何软件包tidycensus
。
让我知道我是否可以提供任何信息。我最近清除了相当新的Mac的硬盘,然后重新开始。
install.packages("tidycensus")
的输出:
> install.packages("tidycensus")
Installing package into ‘/usr/local/lib/R/3.5/site-library’
(as ‘lib’ is unspecified)
also installing the dependencies ‘rgdal’, ‘sf’, ‘tigris’, ‘units’
trying URL 'https://cloud.r-project.org/src/contrib/rgdal_1.3-4.tar.gz'
Content type 'application/x-gzip' length 1664774 bytes (1.6 MB)
==================================================
downloaded 1.6 MB
trying URL 'https://cloud.r-project.org/src/contrib/sf_0.6-3.tar.gz'
Content type 'application/x-gzip' length 7973054 bytes (7.6 MB)
==================================================
downloaded 7.6 MB
trying URL 'https://cloud.r-project.org/src/contrib/tigris_0.7.tar.gz'
Content type 'application/x-gzip' length 72980 bytes (71 KB)
==================================================
downloaded 71 KB
trying URL 'https://cloud.r-project.org/src/contrib/units_0.6-0.tar.gz'
Content type 'application/x-gzip' length 912393 bytes (891 KB)
==================================================
downloaded 891 KB
trying URL 'https://cloud.r-project.org/src/contrib/tidycensus_0.4.6.tar.gz'
Content type 'application/x-gzip' length 1615516 bytes (1.5 MB)
==================================================
downloaded 1.5 MB
* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
configure: R_HOME: /usr/local/Cellar/r/3.5.1/lib/R
configure: CC: clang
configure: CXX: clang++
configure: C++11 support available
configure: rgdal: 1.3-4
checking for /usr/bin/svnversion... yes
configure: svn revision: 766
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/usr/local/lib/R/3.5/site-library/rgdal’
* installing *source* package ‘units’ ...
** package ‘units’ successfully unpacked and MD5 sums checked
configure: units: 0.6-0
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 clang++ accepts -g... yes
checking how to run the C++ preprocessor... clang++ -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
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 for stdbool.h that conforms to C99... no
checking for _Bool... no
checking for error_at_line... no
checking for gcc... clang
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking for XML_ParserCreate in -lexpat... yes
checking udunits2.h usability... no
checking udunits2.h presence... no
checking for udunits2.h... no
checking udunits2/udunits2.h usability... no
checking udunits2/udunits2.h presence... no
checking for udunits2/udunits2.h... no
checking for ut_read_xml in -ludunits2... no
configure: error: in `/private/var/folders/69/wy4n7cc10n5fg5_bc8glmms80000gn/T/RtmpPtsVPP/R.INSTALLf8694f0bf387/units':
configure: error:
--------------------------------------------------------------------------------
libudunits2.so not found!
If the udunits2 library is installed in a non-standard location, use:
--configure-args='--with-udunits2-lib=/usr/local/lib'
for example, if the library was not found, and/or
--configure-args='--with-udunits2-include=/usr/include/udunits2'
if the header was not found, replacing paths with appropriate values for your
installation. You can alternatively use the UDUNITS2_INCLUDE and UDUNITS2_LIBS
environment variables.
If udunits2 is not installed, please install it.
It is required for this package.
--------------------------------------------------------------------------------
See `config.log' for more details
ERROR: configuration failed for package ‘units’
* removing ‘/usr/local/lib/R/3.5/site-library/units’
ERROR: dependency ‘units’ is not available for package ‘sf’
* removing ‘/usr/local/lib/R/3.5/site-library/sf’
ERROR: dependencies ‘rgdal’, ‘sf’ are not available for package ‘tigris’
* removing ‘/usr/local/lib/R/3.5/site-library/tigris’
ERROR: dependencies ‘sf’, ‘tigris’, ‘units’ are not available for package ‘tidycensus’
* removing ‘/usr/local/lib/R/3.5/site-library/tidycensus’
The downloaded source packages are in
‘/private/var/folders/69/wy4n7cc10n5fg5_bc8glmms80000gn/T/Rtmp8iit6a/downloaded_packages’
Warning messages:
1: In install.packages("tidycensus") :
installation of package ‘rgdal’ had non-zero exit status
2: In install.packages("tidycensus") :
installation of package ‘units’ had non-zero exit status
3: In install.packages("tidycensus") :
installation of package ‘sf’ had non-zero exit status
4: In install.packages("tidycensus") :
installation of package ‘tigris’ had non-zero exit status
5: In install.packages("tidycensus") :
installation of package ‘tidycensus’ had non-zero exit status
> install.packages('tidycensus')
Installing package into ‘/usr/local/lib/R/3.5/site-library’
(as ‘lib’ is unspecified)
also installing the dependencies ‘rgdal’, ‘sf’, ‘tigris’, ‘units’
trying URL 'https://cloud.r-project.org/src/contrib/rgdal_1.3-4.tar.gz'
Content type 'application/x-gzip' length 1664774 bytes (1.6 MB)
==================================================
downloaded 1.6 MB
trying URL 'https://cloud.r-project.org/src/contrib/sf_0.6-3.tar.gz'
Content type 'application/x-gzip' length 7973054 bytes (7.6 MB)
==================================================
downloaded 7.6 MB
trying URL 'https://cloud.r-project.org/src/contrib/tigris_0.7.tar.gz'
Content type 'application/x-gzip' length 72980 bytes (71 KB)
==================================================
downloaded 71 KB
trying URL 'https://cloud.r-project.org/src/contrib/units_0.6-0.tar.gz'
Content type 'application/x-gzip' length 912393 bytes (891 KB)
==================================================
downloaded 891 KB
trying URL 'https://cloud.r-project.org/src/contrib/tidycensus_0.4.6.tar.gz'
Content type 'application/x-gzip' length 1615516 bytes (1.5 MB)
==================================================
downloaded 1.5 MB
* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
configure: R_HOME: /usr/local/Cellar/r/3.5.1/lib/R
configure: CC: clang
configure: CXX: clang++
configure: C++11 support available
configure: rgdal: 1.3-4
checking for /usr/bin/svnversion... yes
configure: svn revision: 766
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/usr/local/lib/R/3.5/site-library/rgdal’
* installing *source* package ‘units’ ...
** package ‘units’ successfully unpacked and MD5 sums checked
configure: units: 0.6-0
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 clang++ accepts -g... yes
checking how to run the C++ preprocessor... clang++ -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... rm: conftest.dSYM: is a directory
rm: conftest.dSYM: is a directory
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 for stdbool.h that conforms to C99... no
checking for _Bool... no
checking for error_at_line... no
checking for gcc... clang
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking for XML_ParserCreate in -lexpat... yes
checking udunits2.h usability... no
checking udunits2.h presence... no
checking for udunits2.h... no
checking udunits2/udunits2.h usability... no
checking udunits2/udunits2.h presence... no
checking for udunits2/udunits2.h... no
checking for ut_read_xml in -ludunits2... no
configure: error: in `/private/var/folders/69/wy4n7cc10n5fg5_bc8glmms80000gn/T/RtmpuOGf6j/R.INSTALLfdd5361d965a/units':
configure: error:
--------------------------------------------------------------------------------
libudunits2.so not found!
If the udunits2 library is installed in a non-standard location, use:
--configure-args='--with-udunits2-lib=/usr/local/lib'
for example, if the library was not found, and/or
--configure-args='--with-udunits2-include=/usr/include/udunits2'
if the header was not found, replacing paths with appropriate values for your
installation. You can alternatively use the UDUNITS2_INCLUDE and UDUNITS2_LIBS
environment variables.
If udunits2 is not installed, please install it.
It is required for this package.
--------------------------------------------------------------------------------
See `config.log' for more details
ERROR: configuration failed for package ‘units’
* removing ‘/usr/local/lib/R/3.5/site-library/units’
ERROR: dependency ‘units’ is not available for package ‘sf’
* removing ‘/usr/local/lib/R/3.5/site-library/sf’
ERROR: dependencies ‘rgdal’, ‘sf’ are not available for package ‘tigris’
* removing ‘/usr/local/lib/R/3.5/site-library/tigris’
ERROR: dependencies ‘sf’, ‘tigris’, ‘units’ are not available for package ‘tidycensus’
* removing ‘/usr/local/lib/R/3.5/site-library/tidycensus’
The downloaded source packages are in
‘/private/var/folders/69/wy4n7cc10n5fg5_bc8glmms80000gn/T/Rtmp8iit6a/downloaded_packages’
Warning messages:
1: In install.packages("tidycensus") :
installation of package ‘rgdal’ had non-zero exit status
2: In install.packages("tidycensus") :
installation of package ‘units’ had non-zero exit status
3: In install.packages("tidycensus") :
installation of package ‘sf’ had non-zero exit status
4: In install.packages("tidycensus") :
installation of package ‘tigris’ had non-zero exit status
5: In install.packages("tidycensus") :
installation of package ‘tidycensus’ had non-zero exit status
答案 0 :(得分:0)
对我来说很好。可能的解决方案:
install_github("tidyverse/ggplot2")
安装了ggplot install_github("walkerke/tidycensus")
答案 1 :(得分:0)
我的问题是在非简装安装python3之后,有一些杂散的python3配置文件在周围浮动。我删除了python3并重新安装了brew。
我对有相同问题的用户的建议是运行brew doctor
。如果您遇到的问题与我相同,则您的python3配置文件将显示为问题,您可以uninstall python3并用brew install python3
重新安装。
然后我需要处理一些依赖关系,其中一些依赖于R,某些依赖于brew。
@comfort eagle建议在安装和导入install_github()
之后使用devtools
。