skip to Main Content

I have a Google Cloud Compute Engine instance running for my Discord Bot server. It is an E2-micro instance running Linux/Debian.

I would like to install GraphicsMagick on the instance so it is available for the Node.JS app I am running. I heard that ImageMagick was installed by default on Google Cloud, but that doesn’t seem to be the case anymore. I read you could use it in Cloud Functions and the like.

I have no experience installing binaries on a cloud server, so I’m unsure how to approach it.

Can anybody help?

2

Answers


  1. As per this official doc:

    GraphicsMagick may be compiled from source code for virtually any
    modern Unix system (including Linux and MacOS X) and Microsoft
    Windows. Installation instructions may be found in the following
    files.

    GraphicsMagick is distributed in a number of different archive
    formats. The source code must be extracted prior to compilation as
    follows:

    For example:

    PK-ZIP archive format. Requires that the unzip program from
    Info-Zip(http://www.info-zip.org/UnZip.html) be available. Extract
    similar to:

    unzip GraphicsMagick-1.3.zip
    

    The GraphicsMagick source code is extracted into a subdirectory
    similar to ‘GraphicsMagick-1.3’. After the source code extracted,
    change to the new directory (using the actual directory name) using a
    command similar to:

    cd GraphicsMagick-1.3
    

    Use ‘configure’ to automatically configure, build, and install
    GraphicsMagick. The configure script may be executed from the
    GraphicsMagick source directory (e.g ./configure) or from a separate
    build directory by specifying the full path to configure

    The advantage of using a separate build directory is that multiple
    GraphicsMagick builds may share the same GraphicsMagick source
    directory while allowing each build to use a unique set of options.
    Using a separate directory also makes it easier to keep track of any
    files you may have edited.

    If you are willing to accept configure’s default options (static
    build, 8 bits/sample), and build from within the source directory,
    type:

    ./configure
    

    If you are not happy with configure’s choice of compiler, compilation
    flags, or libraries, you can give ‘configure’ initial values for
    variables by specifying them on the configure command line, e.g.:

    .

    /configure CC=c99 CFLAGS=-O2 LIBS=-lposix
    

    Options which should be common to packages installed under the same
    directory heirarchy may be supplied via a ‘config.site’ file located
    under the installation prefix via the path ${prefix}/share/config.site
    where ${prefix} is the installation prefix

    As an alternative, the CONFIG_SITE environment variable may be used to
    specify the path of a site configuration file to load. This is an
    example config.site file:

    # Configuration values for all packages installed under this prefix
    CC=gcc
    CXX=c++
    CPPFLAGS='-I/usr/local/include'
    LDFLAGS='-L/usr/local/lib -R/usr/local/lib'
    

    When the ‘config.site’ file is being used to supply configuration
    options, configure will issue a message similar to:

    configure: loading site script /usr/local/share/config.site
    

    You can enable optional features, Optional Packages/Options, build and
    install by following above doc

    Login or Signup to reply.
  2. GraphicsMagick can be installed in all currently supported versions of Debian by running the following command.

    sudo apt install graphicsmagick
    

    The following GraphicsMagick packages can also be installed from the default Debian repositories in bullseye and bookworm.

      graphicsmagick-dbg
      graphicsmagick-imagemagick-compat
      graphicsmagick-libmagick-dev-compat
      libgraphicsmagick++-q16-12
      libgraphicsmagick++1-dev
      libgraphicsmagick-q16-3
      libgraphicsmagick1-dev

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search