não pode converter minha imagem por imagemagick em ubuntu 14.04 LTS

0

Como redimensionar imagens facilmente?

Eu quero usar esse método no Ubuntu 14.04 LTS para converter minha imagem

Primeiro instale o imagemagick

sudo apt-get install imagemagick

Abra um terminal e execute este comando:

convert  -resize 50% source.png dest.jpg

Reduzirá o tamanho em 50%

Você também pode especificar o tamanho:

convert  -resize 1024X768  source.png dest.jpg

mas obteve esta saída:

$ convert -resize 40%   DSC_9702 copy.jpg dest.jpg
The program 'convert' can be found in the following packages:
 * imagemagick
 * graphicsmagick-imagemagick-compat
Try: sudo apt-get install <selected package>

$ sudo apt-get install imagemagick
[sudo] password for educ:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  imagemagick-common libfftw3-double3 libilmbase6 liblqr-1-0 libmagickcore5
  libmagickcore5-extra libmagickwand5 libnetpbm10 libopenexr6 netpbm
Suggested packages:
  imagemagick-doc autotrace curl enscript ffmpeg gimp gnuplot grads hp2xx
  html2ps libwmf-bin mplayer povray radiance texlive-base-bin transfig
  ufraw-batch libfftw3-bin libfftw3-dev
The following NEW packages will be installed:
  imagemagick imagemagick-common libfftw3-double3 libilmbase6 liblqr-1-0
  libmagickcore5 libmagickcore5-extra libmagickwand5 libnetpbm10 libopenexr6
  netpbm
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,015 kB of archives. After this operation, 15.1 MB of additional disk space will be used. Do you want to continue? [Y/n] y
Err http://ma.archive.ubuntu.com/ubuntu/ trusty/main imagemagick-common all 8:6.7.7.10-6ubuntu3   Could not resolve 'ma.archive.ubuntu.com'
Err http://ma.archive.ubuntu.com/ubuntu/ trusty/main libfftw3-double3 i386 3.3.3-7ubuntu3   Could not resolve 'ma.archive.ubuntu.com'
Err http://ma.archive.ubuntu.com/ubuntu/ trusty/main libilmbase6 i386 1.0.1-6ubuntu1   Could not resolve 'ma.archive.ubuntu.com'
Err http://ma.archive.ubuntu.com/ubuntu/ trusty/main liblqr-1-0 i386 0.4.1-2ubuntu1   Could not resolve 'ma.archive.ubuntu.com'
Err http://ma.archive.ubuntu.com/ubuntu/ trusty/main libmagickcore5 i386 8:6.7.7.10-6ubuntu3   Could not resolve 'ma.archive.ubuntu.com'
Err http://ma.archive.ubuntu.com/ubuntu/ trusty/main libmagickwand5 i386 8:6.7.7.10-6ubuntu3   Could not resolve 'ma.archive.ubuntu.com'
Err http://ma.archive.ubuntu.com/ubuntu/ trusty/main libopenexr6 i386 1.6.1-7ubuntu1   Could not resolve 'ma.archive.ubuntu.com'
Err http://ma.archive.ubuntu.com/ubuntu/ trusty/main libmagickcore5-extra i386 8:6.7.7.10-6ubuntu3   Could not resolve 'ma.archive.ubuntu.com'
Err http://ma.archive.ubuntu.com/ubuntu/ trusty/main imagemagick i386 8:6.7.7.10-6ubuntu3   Could not resolve 'ma.archive.ubuntu.com'
Err http://ma.archive.ubuntu.com/ubuntu/ trusty/main libnetpbm10 i386 2:10.0-15ubuntu2   Could not resolve 'ma.archive.ubuntu.com'
Err http://ma.archive.ubuntu.com/ubuntu/ trusty/main netpbm i386 2:10.0-15ubuntu2   Could not resolve 'ma.archive.ubuntu.com'
E: Failed to fetch http://ma.archive.ubuntu.com/ubuntu/pool/main/i/imagemagick/imagemagick-common_6.7.7.10-6ubuntu3_all.deb Could not resolve 'ma.archive.ubuntu.com' 
E: Failed to fetch http://ma.archive.ubuntu.com/ubuntu/pool/main/f/fftw3/libfftw3-double3_3.3.3-7ubuntu3_i386.deb Could not resolve 'ma.archive.ubuntu.com'
E: Failed to fetch http://ma.archive.ubuntu.com/ubuntu/pool/main/i/ilmbase/libilmbase6_1.0.1-6ubuntu1_i386.deb Could not resolve 'ma.archive.ubuntu.com'
E: Failed to fetch http://ma.archive.ubuntu.com/ubuntu/pool/main/libl/liblqr/liblqr-1-0_0.4.1-2ubuntu1_i386.deb Could not resolve 'ma.archive.ubuntu.com'
E: Failed to fetch http://ma.archive.ubuntu.com/ubuntu/pool/main/i/imagemagick/libmagickcore5_6.7.7.10-6ubuntu3_i386.deb Could not resolve 'ma.archive.ubuntu.com'
E: Failed to fetch http://ma.archive.ubuntu.com/ubuntu/pool/main/i/imagemagick/libmagickwand5_6.7.7.10-6ubuntu3_i386.deb Could not resolve 'ma.archive.ubuntu.com'
E: Failed to fetch http://ma.archive.ubuntu.com/ubuntu/pool/main/o/openexr/libopenexr6_1.6.1-7ubuntu1_i386.deb Could not resolve 'ma.archive.ubuntu.com'
E: Failed to fetch http://ma.archive.ubuntu.com/ubuntu/pool/main/i/imagemagick/libmagickcore5-extra_6.7.7.10-6ubuntu3_i386.deb Could not resolve 'ma.archive.ubuntu.com'
E: Failed to fetch http://ma.archive.ubuntu.com/ubuntu/pool/main/i/imagemagick/imagemagick_6.7.7.10-6ubuntu3_i386.deb Could not resolve 'ma.archive.ubuntu.com'
E: Failed to fetch http://ma.archive.ubuntu.com/ubuntu/pool/main/n/netpbm-free/libnetpbm10_10.0-15ubuntu2_i386.deb Could not resolve 'ma.archive.ubuntu.com'
E: Failed to fetch http://ma.archive.ubuntu.com/ubuntu/pool/main/n/netpbm-free/netpbm_10.0-15ubuntu2_i386.deb Could not resolve 'ma.archive.ubuntu.com'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

$ sudo apt-get install imagemagick
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  imagemagick-common libfftw3-double3 libilmbase6 liblqr-1-0 libmagickcore5
  libmagickcore5-extra libmagickwand5 libnetpbm10 libopenexr6 netpbm
Suggested packages:
  imagemagick-doc autotrace curl enscript ffmpeg gimp gnuplot grads hp2xx
  html2ps libwmf-bin mplayer povray radiance texlive-base-bin transfig
  ufraw-batch libfftw3-bin libfftw3-dev
The following NEW packages will be installed:
  imagemagick imagemagick-common libfftw3-double3 libilmbase6 liblqr-1-0
  libmagickcore5 libmagickcore5-extra libmagickwand5 libnetpbm10 libopenexr6
  netpbm
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,015 kB of archives. After this operation, 15.1 MB of additional disk space will be used. Do you want to continue? [Y/n] y
Err http://ma.archive.ubuntu.com/ubuntu/ trusty/main imagemagick-common all 8:6.7.7.10-6ubuntu3   Could not resolve 'ma.archive.ubuntu.com'
Err http://ma.archive.ubuntu.com/ubuntu/ trusty/main libfftw3-double3 i386 3.3.3-7ubuntu3   Could not resolve 'ma.archive.ubuntu.com'
Err http://ma.archive.ubuntu.com/ubuntu/ trusty/main libilmbase6 i386 1.0.1-6ubuntu1   Could not resolve 'ma.archive.ubuntu.com'
Err http://ma.archive.ubuntu.com/ubuntu/ trusty/main liblqr-1-0 i386 0.4.1-2ubuntu1   Could not resolve 'ma.archive.ubuntu.com'
Err http://ma.archive.ubuntu.com/ubuntu/ trusty/main libmagickcore5 i386 8:6.7.7.10-6ubuntu3   Could not resolve 'ma.archive.ubuntu.com'
Err http://ma.archive.ubuntu.com/ubuntu/ trusty/main libmagickwand5 i386 8:6.7.7.10-6ubuntu3   Could not resolve 'ma.archive.ubuntu.com'
Err http://ma.archive.ubuntu.com/ubuntu/ trusty/main libopenexr6 i386 1.6.1-7ubuntu1   Could not resolve 'ma.archive.ubuntu.com'
Err http://ma.archive.ubuntu.com/ubuntu/ trusty/main libmagickcore5-extra i386 8:6.7.7.10-6ubuntu3   Could not resolve 'ma.archive.ubuntu.com'
Err http://ma.archive.ubuntu.com/ubuntu/ trusty/main imagemagick i386 8:6.7.7.10-6ubuntu3   Could not resolve 'ma.archive.ubuntu.com'
Err http://ma.archive.ubuntu.com/ubuntu/ trusty/main libnetpbm10 i386 2:10.0-15ubuntu2   Could not resolve 'ma.archive.ubuntu.com'
Err http://ma.archive.ubuntu.com/ubuntu/ trusty/main netpbm i386 2:10.0-15ubuntu2   Could not resolve 'ma.archive.ubuntu.com'
E: Failed to fetch http://ma.archive.ubuntu.com/ubuntu/pool/main/i/imagemagick/imagemagick-common_6.7.7.10-6ubuntu3_all.deb Could not resolve 'ma.archive.ubuntu.com'
E: Failed to fetch http://ma.archive.ubuntu.com/ubuntu/pool/main/f/fftw3/libfftw3-double3_3.3.3-7ubuntu3_i386.deb Could not resolve 'ma.archive.ubuntu.com'
E: Failed to fetch http://ma.archive.ubuntu.com/ubuntu/pool/main/i/ilmbase/libilmbase6_1.0.1-6ubuntu1_i386.deb Could not resolve 'ma.archive.ubuntu.com'
E: Failed to fetch http://ma.archive.ubuntu.com/ubuntu/pool/main/libl/liblqr/liblqr-1-0_0.4.1-2ubuntu1_i386.deb Could not resolve 'ma.archive.ubuntu.com'
E: Failed to fetch http://ma.archive.ubuntu.com/ubuntu/pool/main/i/imagemagick/libmagickcore5_6.7.7.10-6ubuntu3_i386.deb Could not resolve 'ma.archive.ubuntu.com'
E: Failed to fetch http://ma.archive.ubuntu.com/ubuntu/pool/main/i/imagemagick/libmagickwand5_6.7.7.10-6ubuntu3_i386.deb Could not resolve 'ma.archive.ubuntu.com'
E: Failed to fetch http://ma.archive.ubuntu.com/ubuntu/pool/main/o/openexr/libopenexr6_1.6.1-7ubuntu1_i386.deb Could not resolve 'ma.archive.ubuntu.com'
E: Failed to fetch http://ma.archive.ubuntu.com/ubuntu/pool/main/i/imagemagick/libmagickcore5-extra_6.7.7.10-6ubuntu3_i386.deb Could not resolve 'ma.archive.ubuntu.com'
E: Failed to fetch http://ma.archive.ubuntu.com/ubuntu/pool/main/i/imagemagick/imagemagick_6.7.7.10-6ubuntu3_i386.deb Could not resolve 'ma.archive.ubuntu.com'
E: Failed to fetch http://ma.archive.ubuntu.com/ubuntu/pool/main/n/netpbm-free/libnetpbm10_10.0-15ubuntu2_i386.deb Could not resolve 'ma.archive.ubuntu.com'
E: Failed to fetch http://ma.archive.ubuntu.com/ubuntu/pool/main/n/netpbm-free/netpbm_10.0-15ubuntu2_i386.deb Could not resolve 'ma.archive.ubuntu.com'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

$ convert -resize 40%   DSC_9702 copy.jpg dest.jpg
The program 'convert' can be found in the following packages:
 * imagemagick
 * graphicsmagick-imagemagick-compat
Try: sudo apt-get install <selected package>
    
por Educ 17.10.2014 / 17:58

1 resposta

2

Eu acho que parece haver algo errado com a sua configuração de rede, no entanto, você ainda pode pingar o servidor de arquivamento com o seu nome de host, o que me deixa um pouco confuso ...

De qualquer forma, sugiro que você adicione servidores DNS alternativos (fornecidos pelo Google) por:

sudo sh -c "echo nameserver 8.8.8.8 >> /etc/resolvconf/resolv.conf.d/base"
sudo sh -c "echo nameserver 8.8.4.4 >> /etc/resolvconf/resolv.conf.d/base"

E faça suas alterações entrarem em vigor com:

sudo resolvconf -u

Depois disso, execute sudo apt-get update && sudo apt-get install imagemagick para instalar o pacote imagemagick. E você poderá usar o comando convert .

Explicação detalhada e instruções para configurar isso com o NetworkManager podem ser encontradas neste artigo: O que" sudo echo nameserver 8.8.8.8 > /etc/resolv.conf "faz?

Referência:

  1. Servidor de nomes dns persistente para o Ubuntu 14.04
  2. Como defino meu DNS Ubuntu 14.04?
por P.-H. Lin 17.10.2014 / 19:52