{"id":3489,"date":"2014-03-05T23:54:02","date_gmt":"2014-03-06T05:54:02","guid":{"rendered":"http:\/\/icesquare.com\/wordpress\/?p=3489"},"modified":"2014-07-06T14:15:15","modified_gmt":"2014-07-06T19:15:15","slug":"install-usrports-doc-inappropriate-file-type-or-format","status":"publish","type":"post","link":"https:\/\/icesquare.com\/wordpress\/install-usrports-doc-inappropriate-file-type-or-format\/","title":{"rendered":"install: \/usr\/ports\/&#8230;\/doc\/: Inappropriate file type or format"},"content":{"rendered":"<p>While I tried to upgrade both of my FreeBSD server (9 &#038; 10) today, I got the following error: <\/p>\n<p><strong>install: \/usr\/ports\/&#8230;\/doc\/: Inappropriate file type or format<\/strong><\/p>\n<p>Actually, here is the complete error message:<\/p>\n<pre>\r\n===>  Staging for memcached-1.4.17_1\r\n===>   memcached-1.4.17_1 depends on shared library: libevent-2.0.so - found\r\n===>   Generating temporary packing list\r\n\/usr\/bin\/make  install-recursive\r\nMaking install in doc\r\n\/usr\/bin\/make  install-am\r\ntest -z \"\/usr\/local\/man\/man1\" || \/bin\/mkdir -p \"\/usr\/ports\/databases\/memcached\/work\/stage\/usr\/local\/man\/man1\"\r\n install  -o root -g wheel -m 444 memcached.1 '\/usr\/ports\/databases\/memcached\/work\/stage\/usr\/local\/man\/man1'\r\ntest -z \"\/usr\/local\/bin\" || \/bin\/mkdir -p \"\/usr\/ports\/databases\/memcached\/work\/stage\/usr\/local\/bin\"\r\n  install  -s -o root -g wheel -m 555 memcached '\/usr\/ports\/databases\/memcached\/work\/stage\/usr\/local\/bin'\r\ntest -z \"\/usr\/local\/include\/memcached\" || \/bin\/mkdir -p \"\/usr\/ports\/databases\/memcached\/work\/stage\/usr\/local\/include\/memcached\"\r\n install  -o root -g wheel -m 444 protocol_binary.h '\/usr\/ports\/databases\/memcached\/work\/stage\/usr\/local\/include\/memcached'\r\ninstall  -o root -g wheel -m 555 \/usr\/ports\/databases\/memcached\/work\/memcached-1.4.17\/scripts\/memcached-tool \/usr\/ports\/databases\/memcached\/work\/stage\/usr\/local\/bin\r\ninstall  -o root -g wheel -m 444 \/usr\/ports\/databases\/memcached\/work\/memcached-1.4.17\/doc\/ \/usr\/ports\/databases\/memcached\/work\/stage\/usr\/local\/man\/man1\r\ninstall: \/usr\/ports\/databases\/memcached\/work\/memcached-1.4.17\/doc\/: Inappropriate file type or format\r\n*** [post-install] Error code 71\r\n\r\nStop in \/usr\/ports\/databases\/memcached.\r\n*** [install] Error code 1\r\n\r\nStop in \/usr\/ports\/databases\/memcached.\r\n<\/pre>\n<p>Initially, I thought the problem was caused by the syntax error of the code, therefore, I tried to do the following:<\/p>\n<pre>\r\n#Shut down the server\r\nsudo \/usr\/local\/etc\/rc.d\/memcached stop\r\n\r\n#Remove Memcached from the system\r\nsudo make deinstall\r\n\r\n#Clean up the package\r\nsudo make clean\r\n\r\n#Compile the package\r\nsudo make\r\n\r\n#Install the package\r\nsudo make install\r\n<\/pre>\n<p>Unfortunately, it still gave the same error message. I noticed that the error message has something to do with the documentation, so I decide to remove the documentation option in the installation page, i.e.,<\/p>\n<pre>\r\n#Enter the package setup\r\nsudo make config\r\n\r\n#Remove the \"doc\" option.\r\n<\/pre>\n<p>Unfortunately, it still gave the same response. I then tried to investigate the cause of the error. So I tried to copy the error command and re-ran it:<\/p>\n<pre>\r\ninstall  -o root -g wheel -m 444 \/usr\/ports\/databases\/memcached\/work\/memcached-1.4.17\/doc\/ \/usr\/ports\/databases\/memcached\/work\/stage\/usr\/local\/man\/man1\r\n<\/pre>\n<p>Which return the exact the same error message:<\/p>\n<pre>\r\ninstall: \/usr\/ports\/databases\/memcached\/work\/memcached-1.4.17\/doc\/: No such file or directory\r\n<\/pre>\n<p>So I came up an idea. Since I don&#8217;t really need the documentation, why not I disable the document option?<\/p>\n<pre>\r\ncd \/usr\/ports\/databases\/memcached\r\n\r\nsudo nano Makefile\r\n<\/pre>\n<p>Change the following from:<\/p>\n<pre>\r\npost-install:\r\n        ${INSTALL_SCRIPT} ${WRKSRC}\/scripts\/memcached-tool ${STAGEDIR}${PREFIX}\/bin\r\n        ${INSTALL_MAN} ${WRKSRC}\/doc\/${MAN1} ${STAGEDIR}${MAN1PREFIX}\/man\/man1\r\n        @${MKDIR} ${STAGEDIR}${DOCSDIR}\r\n<\/pre>\n<p>To:<\/p>\n<pre>\r\npost-install:\r\n        ${INSTALL_SCRIPT} ${WRKSRC}\/scripts\/memcached-tool ${STAGEDIR}${PREFIX}\/bin\r\n#        ${INSTALL_MAN} ${WRKSRC}\/doc\/${MAN1} ${STAGEDIR}${MAN1PREFIX}\/man\/man1\r\n        @${MKDIR} ${STAGEDIR}${DOCSDIR}\r\n<\/pre>\n<p>That&#8217;s right, I just want to comment out the installation of the man\/documentation part. Now, let&#8217;s try to reinstall the package again.<\/p>\n<pre>\r\n#sudo make install\r\n<\/pre>\n<p>Guess what, it works! Have fun!<\/p>\n<p>&#8211;Derrick<\/p>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>While I tried to upgrade both of my FreeBSD server (9 &#038; 10) today, I got the following error: install: \/usr\/ports\/&#8230;\/doc\/: Inappropriate file type or format Actually, here is the <a class=\"more-link\" href=\"https:\/\/icesquare.com\/wordpress\/install-usrports-doc-inappropriate-file-type-or-format\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[94,146,7,144,6,69],"tags":[171,11],"class_list":["post-3489","post","type-post","status-publish","format-standard","hentry","category-computer-problems-computer-help-pc-support","category-everyday-computer-problem","category-freebsd","category-sever-problem","category-technology","category-troubleshooting-technology","tag-freebsd","tag-memcached"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p1sqzr-Uh","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":31,"url":"https:\/\/icesquare.com\/wordpress\/installing-apache-php-mysql-and-memcached-on-freebsd\/","url_meta":{"origin":3489,"position":0},"title":"Installing Apache, PHP, MySQL and MemCached on FreeBSD","author":"Derrick","date":"May 19, 2009","format":false,"excerpt":"This is my note on how to to install Apache, PHP, MySQL and MemCached on a FreeBSD 7 Box. 1. MySQL Go to the mysql52-server port directory by typing the command: cd \/usr\/ports\/databases\/mysql51-server Build the port by typing: make BUILD_OPTIMIZED=yes BUILD_STATIC=yes Using these two options will speed up the execution\u2026","rel":"","context":"In &quot;FreeBSD&quot;","block_context":{"text":"FreeBSD","link":"https:\/\/icesquare.com\/wordpress\/category\/sever-problem\/freebsd\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":603,"url":"https:\/\/icesquare.com\/wordpress\/weird-php-error-after-freebsd-port-upgrade\/","url_meta":{"origin":3489,"position":1},"title":"Weird PHP Error after FreeBSD port upgrade (PHP Warning:  PHP Startup: Unable to load dynamic library)","author":"Derrick","date":"April 6, 2010","format":false,"excerpt":"Today I upgraded the port on my FreeBSD box using portmaster tools: portmaster -Dai After that, I found that the PHP gave the following weird error: php -v PHP Warning: PHP Startup: Unable to load dynamic library '\/usr\/local\/lib\/php\/20060613\/memcached.so' - \/usr\/local\/lib\/php\/20060613\/memcached.so: Undefined symbol \" php_session_create_id\" in Unknown on line 0 PHP\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":900,"url":"https:\/\/icesquare.com\/wordpress\/cannot-find-autoconf-please-check-your-autoconf-installation-and-the-php_autoconf-environment-variable-then-rerun-this-script\/","url_meta":{"origin":3489,"position":2},"title":"Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.","author":"Derrick","date":"October 22, 2010","format":false,"excerpt":"This post is about FreeBSD, however the idea is about the same for other Unix systems. While I tried to install memcached, the system complained with this message: Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script. This problem is caused by\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":41,"url":"https:\/\/icesquare.com\/wordpress\/installing-apache-php-mysql-and-memcached-on-os-x\/","url_meta":{"origin":3489,"position":3},"title":"Installing Apache, PHP, MySQL and MemCached on OS X","author":"Derrick","date":"May 19, 2009","format":false,"excerpt":"This is my note on how to to install Apache, PHP and MySQL on a an OS X box. Although some of these applications are come with the operating systems, it is always good to know how to upgrade them to the latest version. 1. Apple Developer Tools and Mac\u2026","rel":"","context":"In &quot;Server Problems&quot;","block_context":{"text":"Server Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/sever-problem\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2812,"url":"https:\/\/icesquare.com\/wordpress\/freebsdhow-to-run-pecl-tokyo-tyrant-in-php-5-4\/","url_meta":{"origin":3489,"position":4},"title":"[FreeBSD]How to run PECL Tokyo Tyrant in PHP 5.4","author":"Derrick","date":"May 19, 2012","format":false,"excerpt":"After upgrading to PHP 5.4.3 (which is the first version of PHP 5.4 available in the FreeBSD port), I found that the pecl-tokyo_tyrant could not be compiled. Here is the error messages: cd \/usr\/ports\/databases\/pecl-tokyo_tyrant sudo make ===> pecl-tokyo_tyrant-0.6.0 cannot install: doesn't work with PHP version : 5 (Doesn't support PHP\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1489,"url":"https:\/\/icesquare.com\/wordpress\/php-warning-php-startup-unable-to-load-dynamic-library-usrlocallibphp20090626tokyo_tyrant-so-usrlocallibphp20090626tokyo_tyrant-so-undefined-symbol-ps_globals-in-unknown-on-l\/","url_meta":{"origin":3489,"position":5},"title":"PHP Warning:  PHP Startup: Unable to load dynamic library &#8216;\/usr\/local\/lib\/php\/20090626\/tokyo_tyrant.so&#8217; &#8211; \/usr\/local\/lib\/php\/20090626\/tokyo_tyrant.so: Undefined symbol &#8220;ps_globals&#8221; in Unknown on line 0","author":"Derrick","date":"August 23, 2011","format":false,"excerpt":"Every time I upgrade the PHP and related extensions, I always run into the same problem with some PHP-PECL modules. Recently with the new release of PHP 5.3.7, there is no exception for the trouble. So what kind of trouble I have today? The Tokyo Tyrant (The middleman between my\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"\/wordpress\/wp-content\/uploads\/2011\/08\/tokyocabinet.png","width":350,"height":200},"classes":[]}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts\/3489","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/comments?post=3489"}],"version-history":[{"count":5,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts\/3489\/revisions"}],"predecessor-version":[{"id":3636,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts\/3489\/revisions\/3636"}],"wp:attachment":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/media?parent=3489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/categories?post=3489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/tags?post=3489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}