Cannot build source code in Xcode 4.1 with iOS 4.3.5 device - iphone

I have been developing in Xcode 4.1 with iphone of iOS 4.3.5. It was fine without a version mismatch problem. Today, I connected another iphone which has the same version of iOS (4.3.5) and I could not build source code on to the device. The organizer window said,
The version of iOS on “Hee’s iPhone” does not match any of the
versions of iOS supported for development with this installation of
the iOS SDK. Please restore the device to a version of the OS listed
below, or update to the latest version of the iOS SDK; which is
available here.
I know it will be solved if I update Xcode or downgrade iPhone. However, I want to know other options if there are any. I really wonder why some devices are fine but others are not.

You can put additional SDKs/Symbols for the iPhoneOS/iPhoneSimulator platforms inside:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/[insert ios version folder here]
and
/Developer/Platforms/iPhoneOS.platform/DeviceSupport/[insert ios version folder here]
What I do is download old xcode and new beta xcode, install them to something like /Developer-3.2.3/, then symlink/alias the folders above from the /Developer-3.2.3 to the /Developer.
This lets my 4.1 xcode test on an iOS5.0 phone! The directory paths above might not be exact as I am writing this from my phone but they areaomething close to that. When I get back to my computer I will make sure those directories are correct.
For the simulator versions it would be:
/Developer/Platforms/iPhoneSimulator.platform/SDK/...
Edit (back at my computer):
Here is what my Developer directories looks like:
[ 17:49 root#MacBookPro / ]# ll
drwxrwxr-x+ 44 root admin 1.5K Sep 20 12:37 Applications
drwxrwxr-x 15 root admin 510B Sep 20 13:27 Developer
drwxrwxr-x# 17 root admin 578B Sep 20 13:12 Developer-3.2.4
drwxr-xr-x# 10 root admin 340B Sep 20 13:54 Developer-3.2.5
drwxrwxr-x# 18 root admin 612B Sep 20 13:44 Developer-4.2-beta7
[ 17:46 root#MacBookPro /Developer/Platforms/iPhoneOS.platform/Developer/SDKs ]# ll
lrwxr-xr-x 1 root wheel 75B Sep 20 13:53 iPhoneOS3.2.sdk -> /Developer-3.2.4/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk
drwxr-xr-x 8 root wheel 272B Sep 20 13:26 iPhoneOS4.3.sdk
lrwxr-xr-x 1 root wheel 79B Sep 21 12:50 iPhoneOS5.0.sdk -> /Developer-4.2-beta7/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk
[ 17:46 root#MacBookPro /Developer/Platforms/iPhoneOS.platform/Developer ]# cd ../../DeviceSupport/
[ 17:46 root#MacBookPro /Developer/Platforms/iPhoneOS.platform/DeviceSupport ]# ll
drwxrwxr-x 5 root admin 170B Sep 20 13:26 3.0
drwxrwxr-x 5 root admin 170B Sep 20 13:26 3.1
drwxrwxr-x 5 root admin 170B Sep 20 13:26 3.1.2
drwxrwxr-x 5 root admin 170B Sep 20 13:26 3.1.3
drwxrwxr-x 5 root admin 170B Sep 20 13:26 3.2
drwxrwxr-x 5 root admin 170B Sep 20 13:26 3.2.1
drwxrwxr-x 5 root admin 170B Sep 20 13:26 3.2.2
drwxrwxr-x 5 root admin 170B Sep 20 13:26 4.0
drwxrwxr-x 5 root admin 170B Sep 20 13:26 4.0.1
drwxrwxr-x 5 root admin 170B Sep 20 13:26 4.0.2
drwxrwxr-x 5 root admin 170B Sep 20 13:26 4.1
drwxrwxr-x 5 root admin 170B Sep 20 13:26 4.2
drwxrwxr-x 5 root admin 170B Sep 20 13:26 4.3
lrwxr-xr-x 1 root admin 77B Sep 21 12:54 5.0 (9A5313e) -> /Developer-4.2-beta7/Platforms/iPhoneOS.platform/DeviceSupport/5.0 (9A5313e)/
lrwxr-xr-x 1 root admin 13B Sep 21 12:54 Latest -> 5.0 (9A5313e)
[ 17:46 root#MacBookPro /Developer/Platforms/iPhoneOS.platform/DeviceSupport ]#
In order to do this, you need to install the different versions of Xcode that have different iOS SDKs. To achieve the above, I only installed Xcode 3.2.4, 3.2.4, 4.1, and 4.2 (beta). I use 4.1 as my main /Developer directory.
Once each Xcode is installed into seperate locations, this is how you would symlink the Symbols/SDKs directories from a non-primary Xcode install to your main install path:
/Developer/Platforms/iPhoneOS.platform/DeviceSupport
[ 17:54 root#MacBookPro /Developer/Platforms/iPhoneOS.platform/DeviceSupport ]# cd /Developer/Platforms/iPhoneOS.platform/DeviceSupport
[ 17:54 root#MacBookPro /Developer/Platforms/iPhoneOS.platform/DeviceSupport ]# ln -sf "/Developer-4.2-beta7/Platforms/iPhoneOS.platform/DeviceSupport/5.0 (9A5313e)/" "5.0 (9A5313e)"
[ 17:54 root#MacBookPro /Developer/Platforms/iPhoneOS.platform/DeviceSupport ]# cd ../Developer/SDKs
[ 17:54 root#MacBookPro /Developer/Platforms/iPhoneOS.platform/DeviceSupport ]# ln -sf "/Developer-3.2.4/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk" "iPhoneOS3.2.sdk"
[ 17:54 root#MacBookPro /Developer/Platforms/iPhoneOS.platform/DeviceSupport ]# ln -sf "/Developer-4.2-beta7/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk" "iPhoneOS5.0.sdk"
After symlinking each SDK/Symbol directory in your main /Developer/Platforms/iPhoneOS.platform/DeviceSupport and /Developer/Platforms/iPhoneOS.platform/Developer/SDKs directories, open up Xcode, and you should be able to see your device and use it to test builds, etc.
Edit 2 (commands explained):
ll is an alias I made for the ls -l command:
[ 18:07 root#MacBookPro / ]# alias
cd..='cd ..'
cls='clear'
df='/usr/local/bin/df.nawk'
du='du -L'
l='ls -lsG'
ldir='ls -d */'
ll='ls -lhG'
ls='ls -G'
lsdir='ls -d */'
text='open -a TextWrangler'
v='ls -lhG'
vi='vim'
vu='vim'
vv='du . --max-depth=1 -L | sort -n | cut -f2 | xargs -d "\n" du -sh -L'
xcode='open -a xcode'
ln (symlink) is a command to create a shortcut/alias. The (very basic) syntax is:
[ 18:07 root#MacBookPro / ]# ln -s [TARGET_PATH] [LINK_NAME]
Here is the ln man page
Here is the ls man page

Related

CentOs 7, "Tesseract couldn't load any languages!" however: "List of available languages (2): eng, spa"

this is CentOs 7
when I run tesseract --list-langs
[root#cia tessdata]# tesseract --list-langs
Error opening data file /usr/local/share/tessdata/eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory.
Failed loading language 'eng'
Tesseract couldn't load any languages!
List of available languages (2):
eng
spa
[root#cia tessdata]#
however when I run
[root#cia tessdata]# ls -l /usr/local/share/tessdata/
total 328
drwxr-xr-x. 2 root root 4096 Nov 17 23:28 configs
-rw-r--r--. 1 root root 164228 Nov 18 06:11 eng.traineddata
-rw-r--r--. 1 root root 572 Nov 17 23:28 pdf.ttf
-rw-r--r--. 1 root root 157745 Nov 18 06:11 spa.traineddata
drwxr-xr-x. 2 root root 98 Nov 17 23:28 tessconfigs
[root#cia tessdata]#
I get eng.traineddata and spa.traineddata in this form:
cd /usr/local/share/tessdata
wget https://github.com/tesseract-ocr/tessdata/blob/main/eng.traineddata
wget https://github.com/tesseract-ocr/tessdata/blob/main/spa.traineddata
:::::::::::::::::::::::::::::::::::::::::::
allways I install languages with:
wget https://github.com/tesseract-ocr/tessdata/raw/master/eng.traineddata
wget https://github.com/tesseract-ocr/tessdata/raw/master/spa.traineddata
then allways tesseract work fine, but now this return 404
how I can fix?

vagrant synced_folder file permissions

Vagrant Version 1.6.3
Virtual Box 4.3.12
VBoxGuestAdditions-4.3.2
Host OS -> Windows 8
Guest OS -> CentOS 6.4
This is the content of my Vagrantfile ( where developer is userName )
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.synced_folder ".", "/var/www"
# # comments-> I tried many combinations
# :owner=> 'developer',
# :group=> 'developer'
# :mount_options=> ['dmode=777', 'fmode=777']
Now when I try to change the access permissions of the synced_folder(/var/www) or sub directories or files of synced_folder by chmod command,the result is not as expected
For example
1) vim testFile.php
2) ls -al testFile.php
-rwxrwxrwx 1 developer developer 12 Sep 23 15:52 testFile.php
3) chmod 700 testFile.php
-rwxrwxrwx 1 developer developer 12 Sep 23 15:52 testFile.php
4) chmod 000 testFile.php
-r-xr-xr-x 1 developer developer 12 Sep 23 15:52 testFile.php
5) chmod 111 testFile.php
-r-xr-xr-x 1 developer developer 12 Sep 23 15:52 testFile.php
6) chmod 077 testFile.php
-rwxrwxrwx 1 developer developer 12 Sep 23 15:52 testFile.php
Basically the file is always readable and executable by "owner" , "group" and "others".
The question is why it is so ? Is there any solution for this? I want the synced_folder to behave according to centOS access permissions.
I am really stuck here for past few days.Please help.
Thank you
The guest OS normally preserves host's persmissions. Try adding permissions for other users on Windows.

How to find packages corresponding to particular library versions

I have a server on which I installed CentOS 6.5.
Now I had to install some rpms (IBM's Tivoli Backup Client) but this didn't work,
due to failed dependencies:
[root#server1 tivoli-install]# rpm -ihv TIVsm-APIcit.x86_64.rpm
error: Failed dependencies:
libc.so.6 is needed by TIVsm-APIcit-6.4.1-3.x86_64
libc.so.6(GLIBC_2.0) is needed by TIVsm-APIcit-6.4.1-3.x86_64
libc.so.6(GLIBC_2.1) is needed by TIVsm-APIcit-6.4.1-3.x86_64
libc.so.6(GLIBC_2.1.3) is needed by TIVsm-APIcit-6.4.1-3.x86_64
libc.so.6(GLIBC_2.2) is needed by TIVsm-APIcit-6.4.1-3.x86_64
libc.so.6(GLIBC_2.3) is needed by TIVsm-APIcit-6.4.1-3.x86_64
libc.so.6(GLIBC_2.3.2) is needed by TIVsm-APIcit-6.4.1-3.x86_64
libdl.so.2 is needed by TIVsm-APIcit-6.4.1-3.x86_64
libdl.so.2(GLIBC_2.0) is needed by TIVsm-APIcit-6.4.1-3.x86_64
libdl.so.2(GLIBC_2.1) is needed by TIVsm-APIcit-6.4.1-3.x86_64
libgcc_s.so.1 is needed by TIVsm-APIcit-6.4.1-3.x86_64
libgcc_s.so.1(GCC_3.0) is needed by TIVsm-APIcit-6.4.1-3.x86_64
libgcc_s.so.1(GLIBC_2.0) is needed by TIVsm-APIcit-6.4.1-3.x86_64
libm.so.6 is needed by TIVsm-APIcit-6.4.1-3.x86_64
libnsl.so.1 is needed by TIVsm-APIcit-6.4.1-3.x86_64
libpthread.so.0 is needed by TIVsm-APIcit-6.4.1-3.x86_64
libpthread.so.0(GLIBC_2.0) is needed by TIVsm-APIcit-6.4.1-3.x86_64
libpthread.so.0(GLIBC_2.1) is needed by TIVsm-APIcit-6.4.1-3.x86_64
libpthread.so.0(GLIBC_2.2) is needed by TIVsm-APIcit-6.4.1-3.x86_64
libpthread.so.0(GLIBC_2.3.2) is needed by TIVsm-APIcit-6.4.1-3.x86_64
libstdc++.so.5 is needed by TIVsm-APIcit-6.4.1-3.x86_64
libstdc++.so.5(CXXABI_1.2) is needed by TIVsm-APIcit-6.4.1-3.x86_64
libstdc++.so.5(GLIBCPP_3.2) is needed by TIVsm-APIcit-6.4.1-3.x86_64
libstdc++.so.5(GLIBCPP_3.2.2) is needed by TIVsm-APIcit-6.4.1-3.x86_64
As far as i can tell, i have all the "missing" libraries but in the wrong version.
My shared libraries all have version 2.12:
[root#server1 tivoli-install]# ls -l `locate libc.so`
lrwxrwxrwx. 1 root root 12 Jan 9 13:13 /lib64/libc.so.6 -> libc-2.12.so
-rw-r--r--. 1 root root 253 Nov 21 22:21 /usr/lib64/libc.so
[root#server1 tivoli-install]# ls -l `locate libdl.so`
lrwxrwxrwx. 1 root root 13 Jan 9 13:13 /lib64/libdl.so.2 -> libdl-2.12.so
lrwxrwxrwx. 1 root root 22 Jan 9 13:14 /usr/lib64/libdl.so -> ../../lib64/libdl.so.2
[root#server1 tivoli-install]# ls -l `locate libm.so`
lrwxrwxrwx. 1 root root 12 Jan 9 13:13 /lib64/libm.so.6 -> libm-2.12.so
lrwxrwxrwx. 1 root root 21 Jan 9 13:14 /usr/lib64/libm.so -> ../../lib64/libm.so.6
[root#server1 tivoli-install]# ls -l `locate libnsl.so`
lrwxrwxrwx. 1 root root 14 Jan 9 13:13 /lib64/libnsl.so.1 -> libnsl-2.12.so
lrwxrwxrwx. 1 root root 23 Jan 9 13:14 /usr/lib64/libnsl.so -> ../../lib64/libnsl.so.1
[root#server1 tivoli-install]# ls -l `locate libpthread`
-rwxr-xr-x. 1 root root 145896 Nov 21 22:38 /lib64/libpthread-2.12.so
lrwxrwxrwx. 1 root root 18 Jan 9 13:13 /lib64/libpthread.so.0 -> libpthread-2.12.so
-rw-r--r--. 1 root root 222 Nov 21 22:21 /usr/lib64/libpthread.so
The others also are present in the wrong version:
[root#server1 tivoli-install]# ls -l `locate libstdc++`
lrwxrwxrwx. 1 root root 19 Jan 9 13:13 /usr/lib64/libstdc++.so.6 -> libstdc++.so.6.0.13
-rwxr-xr-x 1 root root 989840 Nov 21 19:08 /usr/lib64/libstdc++.so.6.0.13
-rw-r--r-- 1 root root 2810858 Nov 21 19:08 /usr/lib/gcc/x86_64-redhat-linux/4.4.4/libstdc++.a
lrwxrwxrwx 1 root root 37 Jan 14 13:10 /usr/lib/gcc/x86_64-redhat-linux/4.4.4/libstdc++.so -> ../../../../lib64/libstdc++.so.6.0.13
[root#server1 tivoli-install]# ls -l `locate libgcc_s.so`
lrwxrwxrwx. 1 root root 28 Jan 9 13:12 /lib64/libgcc_s.so.1 -> libgcc_s-4.4.7-20120601.so.1
lrwxrwxrwx 1 root root 20 Jan 14 12:49 /usr/lib/gcc/x86_64-redhat-linux/4.4.4/libgcc_s.so -> /lib64/libgcc_s.so.1
Can somebody tell me how i can find the packages i need to install to fix the failed dependencies?
Thank You
When installing the Tivoli Storage Manager backup-archive
client and API on a 64-bit RHEL 6 system, you might run into
errors like the following:
error: Failed dependencies:
libstdc++.so.6 is needed by TIVsm-API...
In Red Hat Enterprise Linux 5, if a package was available for both
the main and the compatibility architectures, both architectures of
the package were installed by default.
In Red Hat Enterprise Linux 6, only the package for the primary
architecture is installed by default.
To avoid problems during the backup-archive client and API installation
on a 64-bit machine, be sure to install libstdc++ and compat-libstdc++
packages for 32-bit as well.
root# yum list "compat-libstdc*"
Write down the packets listed and install.
root# yum install "compat-libstdc++-33.i686" "compat-libstdc++-33.x86_64"
Good luck !
Marco Lucena
Recife - Pernambuco - Brazil

custom yum repo not showing rpm

I have a yum repository I've set up where I store custom rpms.
I have no problem finding information about other packages that were built and stored in this custom repo.
#yum --disablerepo=rhui-us-east-rhel-server-1y,epel,epel-testing --enablerepo=customrepo install php53-pecl-xdebug
php53-pecl-xdebug x86_64 2.2.1-2 customrepo 132 k
No problem.
Now I drop somerpm.rpm in centos/repo/5/noarch, run createrepo --update . in this directory and try the same command, and yet it shows no results.
I tried running createrepo --update in the root of the repo as well, but that did not work either (I'm actually not sure where to run it and if it needs a repodata directory in each subdir).
[root#reposerver mnt]# ls -l /var/www/repo/
total 12
-rw-r--r-- 1 root root 203 Jun 8 00:13 REPO_README
drwxr-xr-x 3 root root 4096 Jun 10 2011 centos
drwxr-xr-x 2 root root 4096 Oct 18 20:02 repodata
[root#reposerver mnt]# ls -l /var/www/repo/centos/5/
SRPMS/ i386/ noarch/ repodata/ x86_64/
[root#reposerver mnt]# ls -l /var/www/repo/centos/5/noarch/
total 7324
-rw-r--r-- 1 root root 1622 Jun 28 2011 compat-php-5.1.6-1.noarch.rpm
drwxr-xr-x 2 root root 4096 Oct 18 19:55 repodata
-rw-r--r-- 1 root root 1066928 Oct 18 19:54 salt-0.10.3-1.noarch.rpm
-rw-r--r-- 1 root root 6363197 Oct 18 19:54 salt-0.10.3-1.src.rpm
-rw-r--r-- 1 root root 21822 Oct 18 19:54 salt-master-0.10.3-1.noarch.rpm
-rw-r--r-- 1 root root 14294 Oct 18 19:54 salt-minion-0.10.3-1.noarch.rpm
I also tried adding the exactarch=0 flag to my repo config to ignore arch restrictions and this did not work either, it was a shot in the dark, since my rpm is noarch, it should show regardless.
# cat /etc/yum.repos.d/mycompany.repo
[mycompany]
name=mycompany custom repo
baseurl=http://config/repo/centos/5/$basearch
enabled=1
exactarch=0
I'm at a loss at this point. Usually createrepo --update does the trick, but for some reason it cannot find the new rpms.
repo]# find . -type f -name "*.gz" | xargs zcat | grep salt-minion
returns results as well, so it's definitely in the repo data.
yum clean all on the server I was trying to install on worked.
Also make sure to do createrepo --update on the specific subdir instead of the root of the repo.

Build failed when installing node-postgres module for node.js

I'm very (very) new to node.js, and also fairly green when it comes to server side configuration and coding. (I have a long history of client-side programming, most recently with Adobe Flex and ActionScript.)
Anyhow, I asked Rackspace (who manages a Linux server for me) to install node.js and node-postgres.
From the comments in the ticket, that installation went like this:
node.js
Running Transaction
Installing : nodejs-stable-release [1/1]
Installed: nodejs-stable-release.noarch 0:5-3
Complete!
and node-postgres
[root#237175-web2 src]# npm install pg
npm http GET https://registry.npmjs.org/pg
npm http 200 https://registry.npmjs.org/pg
npm http GET https://registry.npmjs.org/pg/-/pg-0.6.17.tgz
npm http GET https://registry.npmjs.org/generic-pool/1.0.9
npm http 200 https://registry.npmjs.org/generic-pool/1.0.9
npm http GET https://registry.npmjs.org/generic-pool/-/generic-pool-1.0.9.tgz
pg#0.6.17 install /usr/src/node_modules/pg
node-waf configure build || (exit 0)
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr
Checking for program pg_config : /usr/bin/pg_config
'configure' finished successfully (0.051s)
Waf: Entering directory `/usr/src/node_modules/pg/build'
[1/2] cxx: src/binding.cc -> build/Release/src/binding_1.o
[2/2] cxx_link: build/Release/src/binding_1.o -> build/Release/binding.node
Waf: Leaving directory `/usr/src/node_modules/pg/build'
'build' finished successfully (0.745s)
pg#0.6.17 ./node_modules/pg
+-- generic-pool#1.0.9
More info:
[root#237175-web2 ~]# ls -la /usr/src/node_modules/pg
total 68
drwxr-xr-x 9 root root 4096 Apr 26 22:34 .
drwxr-xr-x 3 root root 4096 Apr 26 22:34 ..
drwxr-xr-x 2 root root 4096 Apr 26 22:34 benchmark
drwxr-xr-x 4 root root 4096 Apr 26 22:34 build
drwxr-xr-x 3 root root 4096 Apr 26 22:34 lib
-rw-r--r-- 1 root root 5618 Apr 26 22:34 .lock-wscript
-rw-r--r-- 1 root root 1269 Feb 23 23:58 Makefile
drwxr-xr-x 3 root root 4096 Apr 26 22:34 node_modules
-rw-r--r-- 1 root root 21 Mar 3 15:19 .npmignore
-rw-r--r-- 1 root root 962 Apr 26 22:34 package.json
-rw-r--r-- 1 root root 6843 Mar 27 09:30 README.md
drwxr-xr-x 2 root root 4096 Apr 26 22:34 script
drwxr-xr-x 2 root root 4096 Mar 21 23:37 src
drwxr-xr-x 5 root root 4096 Apr 26 22:34 test
-rw-r--r-- 1 root root 990 Feb 23 23:58 wscript
[root#237175-web2 ~]#
A little “Hello world” node.js example works fine (hooray!), but a simple Postgres example fails on the require('pg') statement, saying that the module cannot be found. I've looked on the server and can't find a pg.js file anywhere.
Any clue as to why the node-postgres build failed?
Install it globally:
npm install -g pg
You may need to become root, e.g. with
sudo npm install -g pg