** curl ** não está funcionando no Ubuntu 18.04 LTS

22

Não consigo buscar conteúdo da web usando o curl . Eu tentei intall a saída abaixo.

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. curl : Depends: libcurl4 (= 7.58.0-2ubuntu3) but it is not going to be installed E: Unable to correct problems, you have held broken packages.

Eu verifiquei os pacotes retidos com sudo apt-mark showheld & dpkg -l | grep ^h na esperança de obter uma lista de pacotes mantidos, mas não obtenho nenhum resultado.

Além disso, quando eu tento instalar o libcurl4 , ele quase atrapalha meu sistema, já que ele tenta remover esses pacotes abaixo.

libcurl3 mongodb-enterprise mongodb-enterprise-server mongodb-enterprise-tools msodbcsql msodbcsql17 mssql-tools php7.1-curl r-base r-base-core r-base-dev r-base-html r-cran-boot r-cran-class r-cran-codetools r-cran-foreign r-cran-getopt r-cran-kernsmooth r-cran-lattice r-cran-littler r-cran-mass r-cran-matrix r-cran-mgcv r-cran-nlme r-cran-nnet r-cran-rpart r-cran-spatial r-cran-survival r-recommended slack-desktop virtualbox-5.2

Editar

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution. deb http://gb.archive.ubuntu.com/ubuntu/ bionic main restricted deb-src
http://gb.archive.ubuntu.com/ubuntu/ bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution. deb http://gb.archive.ubuntu.com/ubuntu/ bionic-updates main restricted deb-src
http://gb.archive.ubuntu.com/ubuntu/ bionic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team. deb http://gb.archive.ubuntu.com/ubuntu/ bionic universe deb-src
http://gb.archive.ubuntu.com/ubuntu/ bionic universe

deb http://gb.archive.ubuntu.com/ubuntu/ bionic-updates universe
deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team. deb http://gb.archive.ubuntu.com/ubuntu/ bionic multiverse deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic
multiverse

deb http://gb.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb-src http://gb.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users. deb http://archive.canonical.com/ubuntu bionic partner deb-src
http://archive.canonical.com/ubuntu bionic partner

deb http://security.ubuntu.com/ubuntu bionic-security main restricted
deb-src http://security.ubuntu.com/ubuntu bionic-security main
restricted

deb http://security.ubuntu.com/ubuntu bionic-security universe deb-src
http://security.ubuntu.com/ubuntu bionic-security universe

deb http://security.ubuntu.com/ubuntu bionic-security multiverse
deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse

deb http://gb.archive.ubuntu.com/ubuntu/ bionic-proposed main
multiverse universe restricted #Not for humans during development
stage of release bionic
# ded-src http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted ui=niverse

deb http://gb.archive.ubuntu.com/ubuntu/ bionic-backports main
restricted multiverse universe
    
por Joseph-L-S 28.04.2018 / 17:11

2 respostas

12

Esse problema é comum em vários pacotes no LTS recente do ubuntu. Pacotes pré-instalados têm um possível erro na convenção de versão, porque "18.04" e outros repositórios de referência de strings estão considerando como parte da versão do pacote e não referência ao repositório.
A solução alternativa é desinstalar a dependência pré-instalada e, em seguida, reinstalar. Depois disso, você pode instalar o cURL.

apt remove -y libcurl4
apt install -y libcurl4 curl

Outros pacotes com esse problema são okular e libsdl2, e a solução é a mesma, rastrear dependências problemáticas, remover e reinstalar.

Além disso, você pode usar o mecanismo de downgrade apt (portanto, não é necessário desinstalar os pacotes que dependem do libcurl4 ).

apt install -y libcurl4=7.58.0-2ubuntu3
apt install -y curl
    
por cosmoscalibur 04.07.2018 / 04:22
1

Instale o curl da origem. Isso funcionou para mim

git clone link

link

./ buildconf ./configure faço fazer teste (opcional) sudo make install

    
por Panagiotis Kranidiotis 13.07.2018 / 08:41