не может преобразовать мое изображение imagemagick на ubuntu 14.04 LTS

Как легко изменить размер изображений?

Я хочу использовать тот метод на ubuntu 14.04 LTS для преобразования моего изображения

Первая установка imagemagick

sudo apt-get install imagemagick

Откройте терминал и выполните эту команду:

convert  -resize 50% source.png dest.jpg

Это уменьшит размер на 50%

Можно также указать размер:

convert  -resize 1024X768  source.png dest.jpg

enter image description here

но получил этот вывод:

$ 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>
0
задан 21 January 2017 в 13:33

1 ответ

Я думаю, кажется, существует что-то не так с Вашей конфигурацией сети, однако, Вы могли все еще проверить с помощью ping-запросов сервер архивирования с его именем узла, которые делают меня немного смущенным...

Так или иначе, я предложил бы, чтобы Вы добавили альтернативные серверы DNS (обеспеченный Google):

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"

И вносят Ваши изменения для вступления в силу с:

sudo resolvconf -u

После этого, выполнение sudo apt-get update && sudo apt-get install imagemagick для установки imagemagick пакета. И Вы будете в состоянии использовать эти convert команда.

Подробное объяснение и инструкция для конфигурирования этого с NetworkManager могли быть найдены в этой статье: , Что делает " sudo повторяют сервер имен 8.8.8.8 >/etc/resolv.conf"?

Ссылка:

  1. Сохраняют dns сервер имен для ubuntu 14.04
  2. How, я устанавливаю свой DNS на Ubuntu 14.04?
2
ответ дан 4 August 2019 в 12:15

Другие вопросы по тегам:

Похожие вопросы: