Mac Ports non installa mysql5

0

Sto cercando di installare mysql tramite porte mac e senza fortuna:

/sites $ sudo port install mysql5
Password:
--->  Computing dependencies for mysql5
--->  Building mysql5
Error: org.macports.build for port mysql5 returned: command execution failed
Please see the log file for port mysql5 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_distfiles.macports.org_ports_databases_mysql5/mysql5/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port mysql5 failed

Di seguito è riportata la parte di costruzione della porta mysql / main.log. Sembra che stia fallendo durante l'esecuzione di make, ma ho difficoltà a capire perché ..

:notice:build --->  Building mysql5
:debug:build Executing org.macports.build (mysql5)
:debug:build Environment:
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_distfiles.macports.org_ports_databases_mysql5/mysql5/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.9'
:debug:build Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_distfiles.macports.org_ports_databases_mysql5/mysql5/work/mysql-5.1.72" && /usr/bin/make -j8 -w all'
:debug:build Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_distfiles.macports.org_ports_databases_mysql5/mysql5/work/mysql-5.1.72" && /usr/bin/make -j8 -w all
:info:build make: Entering directory '/opt/local/var/macports/build/_opt_local_var_macports_sources_distfiles.macports.org_ports_databases_mysql5/mysql5/work/mysql-5.1.72'
:info:build Making all in .
:info:build make[1]: Entering directory '/opt/local/var/macports/build/_opt_local_var_macports_sources_distfiles.macports.org_ports_databases_mysql5/mysql5/work/mysql-5.1.72'
:info:build /Applications/Xcode.app/Contents/Developer/usr/bin/make abi_headers="include/mysql/plugin.h include/mysql.h" do_abi_check
:info:build make[2]: Entering directory '/opt/local/var/macports/build/_opt_local_var_macports_sources_distfiles.macports.org_ports_databases_mysql5/mysql5/work/mysql-5.1.72'
:info:build set -ex; \
:info:build     for file in include/mysql/plugin.h include/mysql.h; do \
:info:build              /usr/bin/cc -E -nostdinc -dI -DMYSQL_ABI_CHECK \
:info:build                       -I./include \
:info:build                       -I./include/mysql \
:info:build                       -I./sql \
:info:build                       -I./include \
:info:build                       -I./include/mysql \
:info:build                       -I./sql \
:info:build                                      $file 2>/dev/null | \
:info:build                       /usr/bin/sed -e '/^# /d' \
:info:build                                 -e '/^[     ]*$/d' \
:info:build                                 -e '/^#pragma GCC set_debug_pwd/d' \
:info:build                                 -e '/^#ident/d' > \
:info:build                                            ./abi_check.out; \
:info:build                       /usr/bin/diff -w $file.pp ./abi_check.out; \
:info:build                       /bin/rm ./abi_check.out; \
:info:build     done
:info:build + for file in include/mysql/plugin.h include/mysql.h
:info:build + /usr/bin/cc -E -nostdinc -dI -DMYSQL_ABI_CHECK -I./include -I./include/mysql -I./sql -I./include -I./include/mysql -I./sql include/mysql/plugin.h
:info:build + /usr/bin/sed -e '/^# /d' -e '/^[  ]*$/d' -e '/^#pragma GCC set_debug_pwd/d' -e '/^#ident/d'
:info:build + /usr/bin/diff -w include/mysql/plugin.h.pp ./abi_check.out
:info:build + /bin/rm ./abi_check.out
:info:build + for file in include/mysql/plugin.h include/mysql.h
:info:build + /usr/bin/cc -E -nostdinc -dI -DMYSQL_ABI_CHECK -I./include -I./include/mysql -I./sql -I./include -I./include/mysql -I./sql include/mysql.h
:info:build + /usr/bin/sed -e '/^# /d' -e '/^[  ]*$/d' -e '/^#pragma GCC set_debug_pwd/d' -e '/^#ident/d'
:info:build + /usr/bin/diff -w include/mysql.h.pp ./abi_check.out
:info:build 3,4d2
:info:build < #include "mysql_version.h"
:info:build < #include "mysql_com.h"
:info:build 148d145
:info:build < #include "mysql_time.h"
:info:build 161d157
:info:build < #include "my_list.h"
:info:build 202,203d197
:info:build < #include "typelib.h"
:info:build < #include "my_alloc.h"
:info:build 241d234
:info:build < #include "my_alloc.h"
:info:build make[2]: *** [do_abi_check] Error 1
:info:build make[2]: Leaving directory '/opt/local/var/macports/build/_opt_local_var_macports_sources_distfiles.macports.org_ports_databases_mysql5/mysql5/work/mysql-5.1.72'
:info:build make[1]: *** [abi_check] Error 2
:info:build make[1]: Leaving directory '/opt/local/var/macports/build/_opt_local_var_macports_sources_distfiles.macports.org_ports_databases_mysql5/mysql5/work/mysql-5.1.72'
:info:build make: *** [all-recursive] Error 1
:info:build make: Leaving directory '/opt/local/var/macports/build/_opt_local_var_macports_sources_distfiles.macports.org_ports_databases_mysql5/mysql5/work/mysql-5.1.72'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_distfiles.macports.org_ports_databases_mysql5/mysql5/work/mysql-5.1.72" && /usr/bin/make -j8 -w all
:info:build Exit code: 2
:error:build org.macports.build for port mysql5 returned: command execution failed
:debug:build Error code: CHILDSTATUS 84950 2
:debug:build Backtrace: command execution failed
    while executing
"system -nice 0 $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"portbuild::build_main org.macports.build"
    ("eval" body line 1)
    invoked from within
"eval $procedure $targetname"
:info:build Warning: targets not executed for mysql5: org.macports.activate org.macports.build org.macports.destroot org.macports.install
:notice:build Please see the log file for port mysql5 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_distfiles.macports.org_ports_databases_mysql5/mysql5/main.log
(END)
    
posta doub1ejack 19.05.2015 - 21:47
fonte

1 risposta

1

Quindi risulta che la porta per MySQL al momento fallisce per OS X 10.9.

Ho trovato una buona alternativa qui però: link . Ho installato mysql usando il suo consiglio:

bash <(curl -Ls http://git.io/eUx7rg)

Alcuni suggerimenti:

  • questo assegna all'utente root una password casuale che viene salvata in un file di testo sul desktop
  • mysql è installato in usr/local/mysql
  • avvia mysql con sudo /usr/local/mysql/support-files/mysql.server start
  • interrompi mysql con sudo mysqladmin shutdown

Contenuto del link :

#!/bin/bash
#############################################
# AUTHOR: JONATHAN SCHWENN @JONSCHWENN      #
# MAC MINI VAULT - MAC MINI COLOCATION      #
# MACMINIVAULT.COM - @MACMINIVAULT          #
# VERSION 2.01 RELEASE DATE APR 09 2015     #
# DESC:  THIS SCRIPT INSTALLS MySQL on OSX  #
#############################################
#REQUIREMENTS:
#  OS X 10.7 or newer
#############################################
# CHECK FOR OS X 10.7+
if [[  $(sw_vers -productVersion | grep -E '10.[7-9]|1[0-0]')  ]]
then
# CHECK FOR EXISTING MySQL
if [[ -d /usr/local/mysql  ]]
then
echo "It looks like you already have MySQL installed..."
echo "This script will most likely fail unless MySQL is completley removed."
echo "If MySQL does install, your old version and databases will still be"
echo "under /usr/local/ and you will have to manually move databases to the"
echo "new install.  It's important to copy/move with permissions intact."
echo "..."
echo "..."
    while true; do
        read -p "DO YOU WANT TO CONTINUE? [y/N]" yn
        case $yn in
        [Yy]* ) break;;
        [Nn]* ) exit ;;
        * ) echo "Please answer yes or no.";;
        esac
    done
fi
# MYSQL INSTALLER WANTS A 'pidof' COMMAND SOMETIMES
# SO WE'LL GIVE IT A 'pidof' COMMAND
if [[ !  $(command -v pidof) ]]; then
if [ ! -d "$/usr/local/bin" ]; then
sudo mkdir -p /usr/local/bin
fi
# HARD TO CAT DIRECT TO BIN DIR, PUTTING IN DOCUMENTS THEN MOVING
sudo cat << 'EOF' > ~/Documents/pidof
#!/bin/sh
ps axc|awk "{if (\==\"$1\") print \}"
EOF
sudo mv ~/Documents/pidof /usr/local/bin/pidof
sudo chmod 755 /usr/local/bin/pidof
fi
# LOOKS GOOD, LETS GRAB MySQL AND GET STARTED ...
echo "Downloading MySQL Installers ... may take a few moments"
curl -# -Lo ~/Downloads/MySQL.dmg http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.24-osx10.9-x86_64.dmg
hdiutil attach -quiet ~/Downloads/MySQL.dmg
# PLIST TO ALTER MySQL INSTALLER TO NOT ATTEMPT TO INSTALL STARTUP ITEMS
curl -s -o ~/Downloads/MySQL-install.plist https://raw.githubusercontent.com/MacMiniVault/Mac-Scripts/master/mmvMySQL/install.plist
# DEAR MySQL, WHY HAVE A SPECIFIC 10.9 DOWNLOAD IF IT JUST HAS THE 10.8 INSTALLER?
cd /Volumes/mysql-5.6.24-osx10.8-x86_64/
echo "..."
echo "..."
echo "Installing MySQL, administrator password required ..."
sudo installer -applyChoiceChangesXML ~/Downloads/MySQL-install.plist -pkg mysql-5.6.24-osx10.8-x86_64.pkg -target /
echo "..."
echo "..."
# AS OF RIGHT NOW MYSQL AUTOMATICALLY INSTALLS THE STARTUP ITEMS AND PREFPANE
# STARTUP ITEMS DO NOT WORK IN YOSEMITE - WE MADE A LAUNCHD START SETUP 
# TWO FILES ARE NEEDED
# A PLIST FOR LAUNCHD TO START ON BOOT
# AND A SCRIPT THAT THE PLIST LOADS, SCRIPT WAITS FOR NETWORKING TO INITIALIZE AND STARTS MySQL
curl -s -o ~/Downloads/mmv-start.sh https://raw.githubusercontent.com/MacMiniVault/Mac-Scripts/master/mmvMySQL/mmv-start.sh
sudo mv ~/Downloads/mmv-start.sh /usr/local/mysql/support-files/
sudo chown root:wheel /usr/local/mysql/support-files/mmv-start.sh
sudo chmod +x /usr/local/mysql/support-files/mmv-start.sh
curl -s -o ~/Downloads/com.mysql.server.plist https://raw.githubusercontent.com/MacMiniVault/Mac-Scripts/master/mmvMySQL/com.mysql.server.plist
sudo mv ~/Downloads/com.mysql.server.plist /Library/LaunchDaemons/
sudo chown root:wheel /Library/LaunchDaemons/com.mysql.server.plist
sudo chmod 644 /Library/LaunchDaemons/com.mysql.server.plist
        while true; do
                read -p "DO YOU WANT TO LOAD MySQL ON BOOT? [Y/n]" cnf
                case $cnf in
                [Yy]* ) sudo launchctl load -w /Library/LaunchDaemons/com.mysql.server.plist; break  ;;
                [Nn]* ) sudo launchctl load -w /Library/LaunchDaemons/com.mysql.server.plist; sudo launchctl unload -w /Library/LaunchDaemons/com.mysql.server.plist;  sudo /usr/local/mysql/support-files/mysql.server start; break;;
                * ) echo "Please answer yes or no.";;
                esac
        done
# ADDING MYSQL PATH TO BASH PROFILE, MAY CONFLICT WITH EXISTING PROFILES/.RC FILES
touch ~/.bash_profile >/dev/null 2>&1
echo -e "\nexport PATH=$PATH:/usr/local/mysql/bin" | sudo tee -a  ~/.bash_profile > /dev/null
sudo mkdir /var/mysql; sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
sleep 10
# IF MySQL IS RUNNING, GENERATE, SET, AND DOCUMENT  ROOT PASSWORD
if [[  $(sudo /usr/local/mysql/support-files/mysql.server status | grep "SUCCESS") ]]
then
mypass="$(cat /dev/urandom | base64 | tr -dc A-Za-z0-9_ | head -c8)"
echo $mypass > ~/Desktop/MYSQL_PASSWORD
echo "Setting MySQL root Password to $mypass"
echo "Placing password on desktop..."
/usr/local/mysql/bin/mysql -uroot -e "GRANT ALL ON *.* TO 'root'@'localhost' IDENTIFIED BY '$mypass' WITH GRANT OPTION;"
echo "..."
echo "..."
# UNMOUNT AND DELELTE DOWNLOADED MySQL INSTALLER
cd ~/
hdiutil detach -quiet /Volumes/mysql-5.6.24-osx10.8-x86_64/
sleep 2
rm ~/Downloads/MySQL.dmg
rm ~/Downloads/MySQL-install.plist
# NEW MY.CNF PERFORMANCE OPTION START
echo "BASE PERFORMANCE MY.CNF IS JUST A GENERIC SUGGESTION FOR PERFORMANCE"
echo "YOUR RESULTS MAY VARY AND YOU MAY WANT TO FURTHER TUNE YOUR MY.CNF SETTINGS"
echo "BASE PERFORMANCE MY.CNF INCREASES BUFFERS/MEMORY USAGE"
echo "8GB+ RAM IS RECOMMENDED FOR BASE PERFORMANCE MY.CNF"
echo "..."
sudo cp /usr/local/mysql/my.cnf /usr/local/mysql/mmv.cnf
sudo tee -a /usr/local/mysql/mmv.cnf > /dev/null  << EOF

# CUSTOMIZED BY MMVMySQL SCRIPT - JUST GENERIC SETTINGS
# DO NOT TREAT AS GOSPEL

innodb_buffer_pool_size=2G
skip-name_resolve
max-connect-errors=100000
max-connections=500

EOF
        while true; do
                read -p "DO YOU WANT TO LOAD A BASE PERFORMANCE MY.CNF FILE? [y/N]" cnf
                case $cnf in
                [Yy]* ) sudo cp /usr/local/mysql/mmv.cnf /etc/my.cnf; sudo /usr/local/mysql/support-files/mysql.server restart; break  ;;
                [Nn]* ) break;;
                * ) echo "Please answer yes or no.";;
                esac
        done
# NEW MY.CNF PERFORMANCE OPTION END
# NEW SEQUEL PRO INSTALL OPTION START
while true; do
                read -p "DO YOU WANT TO AUTOMATICALLY INSTALL SEQUEL PRO? [Y/n]" sp
                case $sp in
                [Yy]* ) curl -# -o ~/Downloads/SequelPro.dmg https://sequel-pro.googlecode.com/files/sequel-pro-1.0.2.dmg; hdiutil attach -quiet ~/Downloads/SequelPro.dmg;cp -R /Volumes/Sequel\ Pro\ 1.0.2/Sequel\ Pro.app/ /Applications/Sequel\ Pro.app/; hdiutil detach -quiet /Volumes/Sequel\ Pro\ 1.0.2/;sleep 5; rm ~/Downloads/SequelPro.dmg; echo "Sequel Pro is now in your Applications folder!";  break  ;;
                [Nn]* ) break;;
                * ) echo "Please answer yes or no.";;
                esac
        done
# NEW SEQUEL PRO INSTALL OPTION END
echo " "
echo " "
echo "ALL DONE!  Install Sequel Pro or phpmyadmin to administer MySQL"
echo "Log off and log back in for 'mysql' to be recognized as a command in terminal"
else
"SORRY, MySQL IS NOT RUNNING ... THERE MUST BE A PROBLEM"
fi
else
echo "ERROR: YOU ARE NOT RUNNING OS X 10.7 OR NEWER"
exit 1
fi
    
risposta data 19.05.2015 - 21:47
fonte

Leggi altre domande sui tag