Синтаксическая ошибка: неопределенная строка в кавычках - запуск файла .run

25579
Colin747

Я пытаюсь запустить .runфайл, я вхожу в систему как SU и запускаю следующую команду:

sh xampp-linux-x64-1.8.3-1-installer.run 

но я получаю следующую ошибку:

 Syntax error: Unterminated quoted string 

Какова причина этого?

2
Причина указана («Ошибка синтаксиса»). Вас больше интересует, как это исправить? Если это так, это простой текст (можете ли вы `cat * .run`)? nerdwaller 10 лет назад 0
Выход просто бред. Colin747 10 лет назад 0

4 ответа на вопрос

4
Hennes

The cause is probably an unterminated quoted string in the installer. (well duh!).

Either run it with the -x option to get more debug information, or open the installer in an editor and look for unmatched pairs of quotes.

Example:

#!/usr/bin/env bash #My demo installer! # echo "starting here!" echo "and an error in this line echo "We will never get here!" 

Notice the missing closing quote (") in the second echo line.


Edit:

I just downloaded a file called xampp-linux-x64-1.8.3-1-installer.run from sourceforge (which I assume is the same file as you are using) and when I opened it in vim I noticed it starts with ^?ELF^. This file seems to be an ELF binary.

Using the file command on it confirms this:
file: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), statically linked, stripped

It is not a shell script and the normal way to execute it would either be:

  1. xampp-linux-x64-1.8.3-1-installer.run (assuming the directory is in your search path),
  2. or with the full path prepended. E.g. ./xampp-linux-x64-1.8.3-1-installer.run if you are already in the same directory where the file is. (This is why @erhun's answer worked).
Я посмотрю, я предположил, что это «официальная» загрузка, что в ней не будет никаких ошибок, поэтому я предположил, что это было что-то, что я сделал неправильно. Colin747 10 лет назад 0
Следующая проблема - я не могу открыть файл ни с помощью редактора (inc Vi), ни даже `cat` файла. Есть идеи? Colin747 10 лет назад 0
3
erhun

It will work with this way.

chmod +x xampp-linux-x64-1.8.3-1-installer.run ./xampp-linux-x64-1.8.3-1-installer.run 
0
mareq133

Я попытался установить xampp-linux-x64-1.8.3-2-installer.run и получил то же сообщение. Ни один из этих ответов не сработал для меня, потому что я думаю, что это 64-битная версия, и я пытался установить ее на 32-битной Linux Mint.

Вместо этого я скачал xampp-linux-1.8.3-2-installer.run (обратите внимание на отсутствие x64 в имени файла), и этот сработал. Я выполнил команду chmod, затем sudo ./xampp-linux-1.8.3-2-installer.run и через несколько секунд у меня запустился установщик графического интерфейса.

PS. Вам нужно будет перейти на sourceforge, потому что веб-сайт apachefriends.org предоставит вам версию для x64 по умолчанию.

0
Anshul

Looks not a problem with 64-bit OS.

I got same error and 'uname -m' can confirm it (displays x86_64), although I was already sure specifically purchase 64-bit machine.

Looks like while downloading (wget for many hours, very slow mobile Internet), 'xampp-linux-x64-1.8.3-4-installer.run' got corrupted!

Похожие вопросы