Trying to build a custom amazon image using Packer.
Having trouble installing RVM on the image. Not sure why this is happening because I followed documentation.
This is the comman i'm running:
"sudo gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
7D2BAF1CF37B13E2069D6956105BD0E739499BDB",
"curl -sSL https://get.rvm.io | bash -s stable"
The error
==> amazon-ebs: gpg: keyring `/root/.gnupg/secring.gpg' created
==> amazon-ebs: gpg: keyring `/root/.gnupg/pubring.gpg' created
==> amazon-ebs: gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
==> amazon-ebs: gpg: requesting key 39499BDB from hkp server keys.gnupg.net
amazon-ebs: gpgkeys: HTTP fetch error 6: Could not resolve host: keys.gnupg.net
==> amazon-ebs: gpg: no valid OpenPGP data found.
==> amazon-ebs: gpg: Total number processed: 0
Related
When I wanted to install mariadb 10.3 on ubuntu 18.04, first I executed this commentsudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
Executing: /tmp/apt-key-gpghome.4x5jDMaALH/gpg.1.sh --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
and I got the following error:
gpg: keyserver receive failed: Server indicated a failure
I was facing the same issue, This thing helped me to add the signature. Just edit your resolve.conf file and added google DNS
just went and added this line to
/etc/resolv.conf
nameserver 8.8.8.8 # Google dns
I'm trying to transfere our current website that use symfony2 in a docker container.
The developpers that made the deployement script are gone from the company and i never developped with php.
When i build my image i'm running the same command as they use to deploy.
php5 -d memory_limit=-1 composer.phar self-update && php5 -d memory_limit=-1 composer.phar install --prefer-dist --no-interaction
But when it does work at every deployement it failed a building.
I've checked that my docker image got internet. it does.
I've copied configuration file and ssl from our production service.
The installed packaged are: nodejs php5-cli curl php5-curl php5-mcrypt php5-intl php5-gd mcrypt npm php5-gd php5-common php5-mysql
I use a tool from php-docker to install pdo_mysql: docker-php-ext-install pdo pdo_mysql
The error when building.
PHP Warning: PDO::__construct(): Cannot connect to MySQL by using SSL in /app/jolicone/app/cache/dev/appDevDebugProjectContainer.php on line 3863
PHP Warning: PDO::__construct(): [2002] (trying to connect via tcp://cleardb.com:port-cleardb) in /app/jolicone/app/cache/dev/appDevDebugProjectContainer.php on line 3863
[PDOException]
SQLSTATE[HY000] [2002]
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception
[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command.
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...
The command '/bin/sh -c cd /app/jolicone && php5 -d memory_limit=-1 composer.phar self-update && php5 -d memory_limit=-1 composer.phar install --prefer-dist --no-interaction' returned a non-zero code: 1
Does someone have an idea about where that could come frome ? i've trying install another package php5-mysqlnd but this doesn't work either.
If you want a have an eye to the DockerFile
FROM php:5.6-apache
RUN apt-get update && apt-get upgrade -y && apt-get install -y apt-utils nodejs php5-cli curl php5-curl php5-mcrypt php5-intl php5-gd mcrypt npm php5-gd php5-common php5-mysqlnd
RUN docker-php-ext-install pdo pdo_mysql
# Linking nodejs binary to node alias
RUN ln -s /usr/bin/nodejs /usr/sbin/node
# Telling php about mcrypt extension
RUN sed -i '/memory_limit/c\memory_limit = -1' /etc/php5/cli/php.ini
RUN php5enmod gd mcrypt mysql pdo_mysql
COPY apache2/php.ini /usr/local/etc/php/
# Local Repository
RUN mkdir /app/
COPY jolicone/ /app/jolicone
############# Installing Composer #################
RUN cd /app/jolicone/ && php5 -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN cd /app\/jolicone && php5 composer-setup.php
RUN cd /app/jolicone && php5 -r "unlink('composer-setup.php');"
# Copy Apache2 Configuration
COPY apache2/sites-enabled /etc/apache2/sites-enabled/
COPY apache2/file.pem apache2/file.crt apache2/file.key /etc/apache2/
COPY apache2/ssl /etc/apache2/ssl
RUN a2enmod rewrite headers && service apache2 restart
#Copy composer.json
RUN rm -f /app/jolicone/composer.json
COPY app/composer.json /app/jolicone/
# Copy config.yml
RUN rm -f /app/jolicone/app/config/config.yml
COPY app/config.yml /app/jolicone/app/config/config.yml
# Copy parameters.yml
RUN rm -f /app/jolicone/app/config/parameters.yml
COPY app/parameters.yml /app/jolicone/app/config/parameters.yml
## mise a jour du composer.phar -> OK
RUN cd /app/jolicone && php5 -d memory_limit=-1 composer.phar self-update && php5 -d memory_limit=-1 composer.phar install --prefer-dist --no-interaction
So i added the ca-certificates packages. and now the build is ok.
But when I run my image and try to connect to the website I got the same error.
vmtest:~/Docker$ cat log/*
- - [21/Jun/2016:10:29:00 +0000] "GET / HTTP/1.1" 503 261 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:47.0) Gecko/20100101 Firefox/47.0"
[Tue Jun 21 10:29:04.011586 2016] [:error] [pid 6] [client] PHP Warning: PDO::__construct(): Cannot connect to MySQL by using SSL in /path/file.php on line 1691
[Tue Jun 21 10:29:04.011648 2016] [:error] [pid 6] [client] PHP Warning: PDO::__construct(): [2002] (trying to connect via tcp://db:port) in /path/file.php on line 1691
[Tue Jun 21 10:29:04.011886 2016] [:error] [pid 6] [client] PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] ' in /path/file.php:1691\nStack trace:\n#0 /path/file.php(1691): PDO->__construct('mysql:host=db...', '', '', Array)\n#1 /path/bootstrap.php.cache(2051): appProdProjectContainer->getPdoService()\n#2 /path/file.php(1891): Symfony\\Component\\DependencyInjection\\Container->get('pdo')\n#3 /path/bootstrap.php.cache(2051): appProdProjectContainer->getSession_Handler_PdoService()\n#4 /path/file.php(1903): Symfony\\Component\\DependencyInjection\\Container->get('session.handler...')\n#5 /path/bootstrap.php.cache(2051): appProdProjectContainer->getSession_Storage_NativeService()\n#6 /path/file.php(1887): Symfony\\Component\\DependencyInjection\\Container->get('session.storage...')\n#7 /app/jol in /path/file.php on line 1691
vmtest:~/Docker$
anyone know why i got this error...
and why i cannot install MySQl server on my VPS?
what i need to do?
i got this error :
warning: MySQL-shared-5.5.46-1.el7.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 5072e1f5
error: Failed dependencies:
libc.so.6(GLIBC_2.14)(64bit) is needed by MySQL-shared-5.5.46-1.el7.x86_64
rpmlib(FileDigests) <= 4.6.0-1 is needed by MySQL-shared-5.5.46-1.el7.x86_64
rpmlib(PayloadIsXz) <= 5.2-1 is needed by MySQL-shared-5.5.46-1.el7.x86_64
=========================================================
i reinstall with mysql 5.5.45 and success install mysql-client and mysql-share..
[root#ryobest tampung]# rpm -qa | grep MySQL
MySQL-shared-5.5.45-1.linux2.6
MySQL-client-5.5.45-1.linux2.6
[root#ryobest tampung]# rpm -ivh MySQL-server-5.5.45-1.linux2.6.x86_64.rpm
warning: MySQL-server-5.5.45-1.linux2.6.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 5072e1f5
error: Failed dependencies:
libaio.so.1()(64bit) is needed by MySQL-server-5.5.45-1.linux2.6.x86_64
libaio.so.1(LIBAIO_0.1)(64bit) is needed by MySQL-server-5.5.45-1.linux2.6.x86_64
libaio.so.1(LIBAIO_0.4)(64bit) is needed by MySQL-server-5.5.45-1.linux2.6.x86_64
[root#ryobest tampung]#
[root#ryobest tampung]# rpm -ivh libaio1-0.3.109-44.3.x86_64.rpm
warning: libaio1-0.3.109-44.3.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 09ca02b0
error: Failed dependencies:
rpmlib(PayloadIsLzma) <= 4.4.6-1 is needed by libaio1-0.3.109-44.3.x86_64
[root#ryobest tampung]#
what must i do now? i cannot find rpm rpmlib(PayloadIsLzma) <= 4.4.6-1
You are missing dependencies that are needed by MySQL server.
You have two way to go from here:
Install the dependencies one by one and then re try installation (longer way)
Install using the yum as shown below (faster and much simpler way)
yum install mysql mysql-server
I would advice you to choose the later one if you do not have any issues with network access on your VPS, which normally not the case.
I got error while installing redmine on ubuntu 14.04. I don't understand why I get this error.
Below is are stack I get
apt-get install redmine redmine-mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
redmine is already the newest version.
redmine-mysql is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up redmine (2.4.2-1) ...
dbconfig-common: writing config to /etc/dbconfig-common/redmine/instances/defaul
t.conf
Creating config file /etc/redmine/default/database.yml.new with new version
granting access to database redmine_default for redmine_default#localhost: alrea
dy exists.
creating database redmine_default: already exists.
dbconfig-common: flushing administrative password
Replacing config file /etc/redmine/default/session.yml with new version
A new secret session key has been generated in /etc/redmine/default/session.yml
Populating database for redmine instance "default".
This may take a while.
rake aborted!
Server is running in --secure-auth mode, but 'redmine_default'#'localhost' has a
password in the old format; please change the password to the new format
/var/lib/gems/1.9.1/gems/mysql2-0.3.16/lib/mysql2/client.rb:70:in `connect'
/var/lib/gems/1.9.1/gems/mysql2-0.3.16/lib/mysql2/client.rb:70:in `initialize'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
Error when running rake db:migrate, check database configuration.
dpkg: error processing package redmine (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
redmine
E: Sub-process /usr/bin/dpkg returned an error code (1)
Errors were encountered while processing: redmine
E: Sub-process /usr/bin/dpkg returned an error code (1)`
Following is output of command dpkg -l redmine
`Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
iF redmine 2.4.2-1 all flexible project management web a`
Rails version install on my machine
rails -v
Rails 4.1.4
Ruby version install on my machine
ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
apache2 version
`apache2 -v
Server version: Apache/2.4.7 (Ubuntu)
Server built: Apr 3 2014 12:20:28`
I am new to ubuntu and also linux. Can anyone identify why I get this error ?
The problem is the way the password is being passed to the MySQL server.
You can set secure_auth: true in the database.yml file right under where the password is specified to use the appropriate format.
Alternatively, you could disable secure auth in the mysql daemon config and restart.
I have downloaded mysql-5.6.17-osx10.7-x86.tar.gz from here. Now I've got a folder full of MySQL-related files. Trouble is, I don't know what to do to install MySQL. I tried executing mysql_install_db, but the result was:
Last login: Sat May 24 10:45:08 on ttys000
host237-40-dynamic:~ michelegorini$ /Users/michelegorini/Downloads/mysql-5.6.17-osx10.7-x86/scripts/mysql_install_db ; exit;
FATAL ERROR: Could not find ./bin/my_print_defaults
If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.
If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.
logout
[Process completed]
So what do I do now?
Update:
Taking the answer into account, I tried something, with this result:
Last login: Sat May 24 10:45:08 on ttys000
host237-40-dynamic:Hakka_ michelegorini$ $ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
curl: (22) The requested URL returned error: 400
-bash: $: command not found
host237-40-dynamic:Hakka_ michelegorini$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" && brew install git &&
> brew update
curl: (22) The requested URL returned error: 400
-bash: brew: command not found
host237-40-dynamic:Hakka_ michelegorini$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" && brew install git && brew update && brew install mysql
curl: (22) The requested URL returned error: 400
-bash: brew: command not found
host237-40-dynamic:Hakka_ michelegorini$
What now?
The homebrew package manager takes away the pain in installing packages on your computer.
Here's how to install mysql on a mac
The command in one line:
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" && brew install git && brew update && brew install mysql