I have an installation of Airflow in my requirements.in file -e git+git#github.com:apache/airflow.git#egg=apache-airflow and I want another line that will install the backport providers Google package with a cherry picked commit from my own fork.
-e git+git#github.com:myfork/airflow.git#egg=apache-airflow&subdirectory=airflow/operators/google but when compiling the requirements (piptools) I get an error saying that apache-airflow/airflow/providers/google cannot be found.
How can you pip install from the same repo under different directories? e.g. one for the full Airflow installation and the second for just the backport package under airflow.providers.google
I can not install mariadb-server. I run the following command:
sudo apt install mariadb-server mariadb-client -y
The following message appears:
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies.
mariadb-client-core-10.5 : Depends: libreadline5 (>= 5.2) but it is not installable
E: Unable to correct problems, you have held broken packages.
How can I fix these dependecies?
Thanks in advance!!!
=========================================
sudo apt install mariadb-client-core-10.5 -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies.
mariadb-client-core-10.5 : Depends: libreadline5 (>= 5.2) but it is not installable
E: Unable to correct problems, you have held broken packages.
I have tried with aptitude:
** sudo aptitude install mariadb-server **
The following NEW packages will be installed:
gawk{a} libsigsegv2{a} mariadb-server{b}
0 packages upgraded, 3 newly installed, 0 to remove and 19 not upgraded.
Need to get 434 kB of archives. After unpacking 1.772 kB will be used.
The following packages have unmet dependencies:
mariadb-server : Depends: mariadb-server-10.5 (>= 1:10.5.15+maria~focal) but it is not installable
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) mariadb-server [Not Installed]
Accept this solution? [Y/n/q/?] Y
The following NEW packages will be installed:
gawk{a} libsigsegv2{a}
0 packages upgraded, 2 newly installed, 0 to remove and 19 not upgraded.
Need to get 430 kB of archives. After unpacking 1.761 kB will be used.
Do you want to continue? [Y/n/?] Y
Get: 1 http://es.archive.ubuntu.com/ubuntu impish/main amd64 libsigsegv2 amd64 2.13-1ubuntu2 [14,6 kB]
Get: 2 http://es.archive.ubuntu.com/ubuntu impish/main amd64 gawk amd64 1:5.1.0-1build1 [416 kB]
Fetched 430 kB in 1s (718 kB/s)
Selecting previously unselected package libsigsegv2:amd64.
(Reading database ... 209196 files and directories currently installed.)
Preparing to unpack .../libsigsegv2_2.13-1ubuntu2_amd64.deb ...
Unpacking libsigsegv2:amd64 (2.13-1ubuntu2) ...
Setting up libsigsegv2:amd64 (2.13-1ubuntu2) ...
Selecting previously unselected package gawk.
(Reading database ... 209203 files and directories currently installed.)
Preparing to unpack .../gawk_1%3a5.1.0-1build1_amd64.deb ...
Unpacking gawk (1:5.1.0-1build1) ...
Setting up gawk (1:5.1.0-1build1) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for libc-bin (2.34-0ubuntu3.2) ...
I have installed the client with aptitude:
** sudo aptitude install mariadb-client **
The following NEW packages will be installed:
mariadb-client{b}
0 packages upgraded, 1 newly installed, 0 to remove and 19 not upgraded.
Need to get 3.096 B of archives. After unpacking 10,2 kB will be used.
The following packages have unmet dependencies:
mariadb-client : Depends: mariadb-client-10.5 (>= 1:10.5.15+maria~focal) but it is not installable
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) mariadb-client [Not Installed]
Accept this solution? [Y/n/q/?]
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
The client still does not connect....
Command 'mysql' not found, but can be installed with:
sudo apt install mysql-client-core-8.0 # version 8.0.28-0ubuntu0.21.10.3, or
sudo apt install mariadb-client-core-10.5 # version 1:10.5.15-0ubuntu0.21.10.1
juanma#juanma-HP-Laptop-17-ca1xxx:~$ mariadb
Command 'mariadb' not found, but can be installed with:
sudo apt install mariadb-client-core-10.5
juanma#juanma-HP-Laptop-17-ca1xxx:~$ sudo apt install mariadb-client-core-10.5 -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies.
mariadb-client-core-10.5 : Depends: libreadline5 (>= 5.2) but it is not installable
E: Unable to correct problems, you have held broken packages.
Thanks
============================================================
In the end I have done it with Docker and with a script and it has worked perfectly. Thank you all:
#!/bin/bash
docker run --name mariadbtest -e MYSQL_ROOT_PASSWORD=mypass -p 3306:3306 -d docker.io/library/mariadb:10.3
sudo apt install mysql-client-core-8.0
mysql -h 172.17.0.2 -u root -p
In the end I have done it with Docker and with a script and it has worked perfectly. Thank you all:
#!/bin/bash
docker run --name mariadbtest -e MYSQL_ROOT_PASSWORD=mypass -p 3306:3306 -d docker.io/library/mariadb:10.3
sudo apt install mysql-client-core-8.0
mysql -h 172.17.0.2 -u root -p
Im trying to set up a CI for a R package. In that regard I`m considering circleCI, which has worked out with previous R projects. However this time, I get the following error:
Downloading renv 0.14.0 ... OK (downloaded source)
Installing renv 0.14.0 ... Done!
Successfully installed and loaded renv 0.14.0.
Project '~/main' loaded. [renv 0.14.0]
devtools::install_deps(dependencies = TRUE)
Error in loadNamespace(x) : there is no package called ‘devtools’
Calls: loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
My .circleci/config.yml looks similar to that one
version: 2
jobs:
build:
docker:
- image: my_random_image
steps:
- checkout
- run:
name: Install package dependencies
command: R -e "devtools::install_deps(dep = TRUE)"
- run:
name: Build package
command: R CMD build .
- run:
name: Check package
command: R CMD check *tar.gz
and my_random_image looks as follows:
FROM r-base:4.1.2
RUN apt-get update \
&& apt-get install git libssl-dev ssh texlive-latex-base texlive-fonts-recommended
libcurl4-openssl-dev libxml2-dev -y \
&& rm -rf /var/lib/apt/lists/*
RUN R -e "install.packages(c('devtools', 'roxygen2'), repos='http://cran.us.r- project.org')"
So its pretty standard stuff, as far as I can see. The error only occurs if renv is part if my R package. Otherwise circleCI does not complain and runs as expected without any errors.
I would like to keep renv in my R project and therefore struggle to understand the issue and the solution to that.
appreciate any help!!
The issue here is most likely that your run stage, here:
- run:
name: Install package dependencies
command: R -e "devtools::install_deps(dep = TRUE)"
installs packages into the default user / site libraries, but when R is launched in your project's working directory:
Downloading renv 0.14.0 ... OK (downloaded source)
Installing renv 0.14.0 ... Done!
Successfully installed and loaded renv 0.14.0.
Project '~/main' loaded. [renv 0.14.0]
the renv autoloader is automatically downloading renv, and activating the renv project library.
By default, renv isolates projects from the user / site library, so the packages installed in your earlier steps are not visible within the project. This behavior is intentional, and ensures that different project libraries are isolated both from changes in the user / site libraries, as well as in other project libraries.
One of the following should help:
If your renv.lock is up to date, call renv::restore() before trying to use devtools or other packages;
Allow renv to see the user library, with e.g. the environment variable RENV_CONFIG_USER_LIBRARY = TRUE.
I'd recommend reading https://rstudio.github.io/renv/articles/renv.html and https://rstudio.github.io/renv/articles/ci.html if you haven't already.
I am trying to create new project using following command but it stops at last line for hours. I have pasted the output from command.
I have tried updating composer also.
$ composer create-project symfony/website-skeleton my_project_name
The script began well
Creating a "symfony/website-skeleton" project at "./my_project_name"
Installing symfony/website-skeleton (v5.0.99)
- Installing symfony/website-skeleton (v5.0.99): Loading from cache
Created project in C:\Users\Captain\Desktop\my_project_name
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing symfony/flex (v1.6.2): Loading from cache
Symfony operations: 1 recipe (2d3facef6986e76f376f76f911c83b03)
- Configuring symfony/flex (>=1.0): From github.com/symfony/recipes:master
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "5.0.*"
But nothing happens after this line.
I am trying to install sparkTable in R 3.1.0 which depends on Rglpk. I manually installed GPLK on the system and added the libs folder to LD_LIBRARY_PATH before going into R for the install.packages("sparkTable") procedure. I get this error during the installation process. Any ideas?
* installing *source* package ‘Rglpk’ ...
** package ‘Rglpk’ successfully unpacked and MD5 sums checked
** libs
/bin/sh: line 0: cd: GLPK: No such file or directory
make: *** [GLPK.ts] Error 1
ERROR: compilation failed for package ‘Rglpk’
* removing ‘/opt/R/R-3.1.0/lib64/R/library/Rglpk’
ERROR: dependency ‘Rglpk’ is not available for package ‘sparkTable’
* removing ‘/opt/R/R-3.1.0/lib64/R/library/sparkTable’
sudo apt-get install libglpk-dev
did the trick for me.
I had this problem and took a good bit of digging in the package to understand what was happening. If Rgplk can't compile its test program when installing, it does something weird, including this bizarre cd to nowhere. Assuming glpk-devel is installed, the reason it can't compile the test program is that it can't find the gplk header as it is in a non-standard directory.
Just set the environment variable CPATH=/usr/include/glpk
and the test program will compile, allowing the package install to proceed normally.
I had this problem too. The following steps solved this issue for me. My current setup:
OS: Scientifc Linux version 6.5 (on a High Performance Cluster Server)
local user, no root access.
GLPK was not installed
Install GLPK in a local directory:
wget http://ftp.gnu.org/gnu/glpk/glpk-4.54.tar.gz
tar xfzv glpk-4.54.tar.gz
mkdir GLPK
cd glpk-4.54
./configure --prefix=/home/<username>/GLPK
make
make install
Install Rglpk (0.6-3):
cd ~
wget http://cran.r-project.org/src/contrib/Rglpk_0.6-3.tar.gz
export LIBRARY_PATH=/home/<username>/GLPK/lib
R CMD INSTALL Rglpk_0.6-3.tar.gz
I landed on this page, because I could not update igraph under Windows 10/11, since igraph also requires glpk as per OP. Specifically:
igraph_glpk_support.h:36:10: fatal error: glpk.h: No such file or
directory #include <glpk.h>
^~~~~~~~ compilation terminated. make: *** [C:/PROGRA~1/R/R-4.1.1/etc/x64/Makeconf:238: feedback_arc_set.o] Error
1 ERROR: compilation failed for package 'igraph'
removing 'C:/Users/xxx/Documents/R/win-library/4.1/igraph'
restoring previous 'C:/Users/xxx/Documents/R/win-library/4.1/igraph' Warning
in install.packages : installation of package ‘igraph’ had non-zero
exit status
I am under Windows 11 (but would be same for Windows 10).
Simple resolution is suggested here:
start Rtools Bash (found in all apps, Rtools 4.0 in the Windows menu)
Run pacman -S mingw-w64-x86_64-glpk and confirm with yes (y)
Run pacman -S mingw-w64-x86_64-libxml2 and confirm with yes (y)
Updating igraph in Rstudio now leads to a clean
DONE (igraph)
(there is no need to install anything, add any path, etc... just the above 4 steps)
In ubuntu 14.04, all above doesn't work. the following however works, without the need of installing libglpk-dev using apt-get.
download the glpk package from gnu and extract it:
wget http://ftp.gnu.org/gnu/glpk/glpk-4.55.tar.gz
tar xvf glpk-4.55.tar.gz
make a GLPK directory in your local path:
mkdir ~/GLPK
configure within glpk:
cd glpk-4.55
./configure --prefix=$HOME/GLPK
cd ..
export LD_LIBRARY_PATH=$HOME/GLPK/lib
export LIBRARY_PATH=$HOME/GLPK/lib
export CPATH=$HOME/GLPK/include
download the Rglpk package from cran and extract it:
wget http://cran.r-project.org/src/contrib/Rglpk_0.6-0.tar.gz
tar xvf Rglpk_0.6_0.tar.gz
move the glpk directory into Rglpk/src and rename it to GLPK:
mv glpk-4.55 Rglpk/src/GLPK
now you can install:
R CMD INSTALL Rglpk
now a bit of explanation of what's going on. The "src/Makevars.in" file in the Rglpk package contains a line of code to enter a non-existing directory 'GLPK' within the src/ folder:
(line 11 of Makevars.in)
GLPK.ts:
#(cd GLPK && make)
touch $#
this is where the problem arises. obviously the code is trying to build glpk within that directory for some unknown reasons. and the solution above is achieved simply by moving the downloaded (and configured) glpk directory there...
If you're on a Debian-based Linux distribution, run this to install GLTK:
sudo apt install libglpk-dev
If you're on MacOS, run this to install GLTK:
brew install gltk
Finally, install the R library:
install.packages("Rglpk")
On Centos, have sudo rights. None of the above worked, but had to install GLPK in /usr/local as suggested in this SO answer. Been trying to install it for about 3 hours fml
You must install glpk dependency first.
On macOS (via homebrew):
brew install glpk
or in RStudio (via homebrew):
system("brew install glpk")
It worked for me when I combined the answers from Simón Ramírez Amaya and shadowleaves:
wget http://ftp.gnu.org/gnu/glpk/glpk-4.54.tar.gz
tar xfzv glpk-4.54.tar.gz
mkdir GLPK
cd glpk-4.54
./configure --prefix=$HOME/GLPK
make
make install
cd ..
export LD_LIBRARY_PATH=$HOME/GLPK/lib
export LIBRARY_PATH=$HOME/GLPK/lib
export CPATH=$HOME/GLPK/include
wget https://cran.r-project.org/src/contrib/Rglpk_0.6-4.tar.gz
R CMD INSTALL Rglpk_0.6-4.tar.gz
To load the library
dyn.load(file.path(Sys.getenv("HOME"), "GLPK", "lib", "libglpk.so"))
library(Rglpk)
The answer of Zhiying Cui is right, however, if your script has some special codes, such as foreach for parallel computing, it may raise an error.
A better way is as fellow
If your os is Centos, try
yum install glpk-devel
then just go to R or Rstudio server and
install.packages("Rglpk")