`TxDb.Hsapiens.UCSC.hg19.knownGene` and `EnsDb.Hsapiens.v75` can't be installed I think there is a problem with TxDb.Hsapiens.UCSC.hg19.knownGene and  EnsDb.Hsapiens.v75.  I'm struggling to install all of these packages as they pause at  byte-compile and prepare package for lazy loading . Can anyone try to re-install them in their local machine because am not the only one who is having the problem, please? They used to work fine until a week ago!
As usual, I install the packages by:
BiocManager::install(c(&quot;Homo.sapiens&quot;, &quot;EnsDb.Hsapiens.v75&quot;, &quot;TxDb.Hsapiens.UCSC.hg19.knownGene&quot;))


I also tried installing them individually:
BiocManager::install(&quot;EnsDb.Hsapiens.v75&quot;)
BiocManager::install(&quot;TxDb.Hsapiens.UCSC.hg19.knownGene&quot;)

It pause at:
* installing *source* package ‘TxDb.Hsapiens.UCSC.hg19.knownGene’ ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading

sessionInfo( )
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] BiocManager_1.30.10 compiler_4.0.3      tools_4.0.3    

I've tried with and without RStudio.
I'd be grateful if someone can try to replicate the error, please?
I am able to successfully install these packages using:
BiocManager::install(c(&quot;Homo.sapiens&quot;, &quot;EnsDb.Hsapiens.v75&quot;, &quot;TxDb.Hsapiens.UCSC.hg19.knownGene&quot;))

This completes without any errors / warnings (R v4.0.3 / macOS 10.16), so I don't believe the packages themselves/Bioconductor are 'broken', but I suspect you are having compiler issues due to the Big Sur update.
These are the steps I used to solve the problem:

Reinstall xcode command line tools (even if it says &quot;up to date&quot;)

sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install


Install gcc &amp; llvm via Homebrew (instructions for installing Homebrew) or, if you already have gcc/llvm installed via Homebrew, skip to the next step

# This can take several hours
brew install gcc
brew install llvm


Once you have gcc &amp; llvm installed via Homebrew:

brew cleanup
brew update
brew upgrade
brew reinstall gcc
brew reinstall llvm


Link some headers into /usr/local/include

sudo ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/* /usr/local/include/

# You can safely ignore warnings like this:
#ln: /usr/local/include//tcl.h: File exists
#ln: /usr/local/include//tclDecls.h: File exists
#ln: /usr/local/include//tclPlatDecls.h: File exists
#ln: /usr/local/include//tclTomMath.h: File exists
#ln: /usr/local/include//tclTomMathDecls.h: File exists
#ln: /usr/local/include//tk.h: File exists
#ln: /usr/local/include//tkDecls.h: File exists
#ln: /usr/local/include//tkPlatDecls.h: File exists


Create a new ~/.R/Makevars file (if you already have a ~/.R/Makevars file, save it in a different directory (away from ~/.R/)) and include only these lines in the file:

FLIBS=-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin19/10.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
CXX1X=/usr/local/gfortran/bin/g++
CXX98=/usr/local/gfortran/bin/g++
CXX11=/usr/local/gfortran/bin/g++
CXX14=/usr/local/gfortran/bin/g++
CXX17=/usr/local/gfortran/bin/g++

LLVM_LOC = /usr/local/opt/llvm
CC=/usr/local/gfortran/bin/gcc -fopenmp
CXX=/usr/local/gfortran/bin/g++ -fopenmp
CFLAGS=-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe
CXXFLAGS=-g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe
LDFLAGS=-L/usr/local/opt/gettext/lib -L$(LLVM_LOC)/lib -Wl,-rpath,$(LLVM_LOC)/lib
CPPFLAGS=-I/usr/local/opt/gettext/include -I$(LLVM_LOC)/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include


Compile a package from source in R/Rstudio

# To check whether openmp is enabled, compile data.table:
install.packages(&quot;data.table&quot;, type = &quot;source&quot;)


If your package fails to compile, a couple of SO users have had to install a fresh gfortran (re: https://stackoverflow.com/a/65334247/12957340), which you can download from https://github.com/fxcoudert/gfortran-for-macOS/releases/tag/10.2-bigsur-intel

Once you can install packages from source without error/issue, update Bioconductor
BiocManager::install(version = &quot;3.12&quot;)

Then, finally, you should be able to install your packages using
BiocManager::install(c(&quot;Homo.sapiens&quot;, &quot;EnsDb.Hsapiens.v75&quot;, &quot;TxDb.Hsapiens.UCSC.hg19.knownGene&quot;))