Jump to content

Issue with Ubuntu 19.10 Server

Guest
Go to solution Solved by WereCatf,
3 minutes ago, Nolanrulesroblox said:

The commands that are not working are printF and read

It's not printF, it's printf. Pay more attention to what you write. Also, printf is provided by the package coreutils, ie. apt -y install coreutils on your server. You can also add the following to your script to check for existence of printf and to install it, if it's missing:
 

which printf >/dev/null
if [ $? -eq 1 ]
then
	apt -y install coreutils
fi

 

I wrote a Script to Install Apache2, PHP and a few other thins and it doesnt seem to work on the Server version of Ubuntu, but it works fine on Desktop

 

Issues:

Printf (not working)

and

Read (press enter to Continue) 

 

My Script https://github.com/Nolanrulesroblox/Apache2-Install-V2

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

that's strange... the 2 should be identical. are you sure the commands you are trying to use have their corresponding programs installed?

She/Her

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Twilight said:

that's strange... the 2 should be identical. are you sure the commands you are trying to use have their corresponding programs installed?

The script is running Basic Bash scripting

 

Here is my code https://github.com/Nolanrulesroblox/Apache2-Install-V2/blob/master/Apache2 Install and Uninstall.sh

 

Like i could do a fresh install of ubuntu (desktop) and it works fine but with the server it craps itself

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Nolanrulesroblox said:

i could do a fresh install of ubuntu (desktop) and it works fine but with the server it craps itself

that is because Server is missing a bunch of stuff that Desktop comes with in order to keep it lightweight. it's possible that your script relies on some things that server doesn't come with and that need to be installed seperately. double check this. 

She/Her

Link to comment
Share on other sites

Link to post
Share on other sites

On 2/27/2020 at 1:32 AM, Nolanrulesroblox said:

I wrote a Script to Install Apache2, PHP and a few other thins and it doesnt seem to work on the Server version of Ubuntu, but it works fine on Desktop

 

Issues:

Printf (not working)

and

Read (press enter to Continue) 

 

My Script https://github.com/Nolanrulesroblox/Apache2-Install-V2

 

 

Have this script worked on server version before?

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, AbsoluteFool said:

Have this script worked on server version before?

The script was made on the Ubuntu Desktop but it never works on the Server version.  

for the Bash script codes

PrintF

and

Read (enter to continue) 

 

are broken, do i need to apt-get the code for bash? or?

Link to comment
Share on other sites

Link to post
Share on other sites

On 2/26/2020 at 7:03 PM, Twilight said:

that is because Server is missing a bunch of stuff that Desktop comes with in order to keep it lightweight. it's possible that your script relies on some things that server doesn't come with and that need to be installed seperately. double check this. 

Is there a way i can locate the installs for the parts of the script?

prinf and read

Link to comment
Share on other sites

Link to post
Share on other sites

43 minutes ago, Nolanrulesroblox said:

The script was made on the Ubuntu Desktop but it never works on the Server version.  

for the Bash script codes

PrintF

and

Read (enter to continue) 

 

are broken, do i need to apt-get the code for bash? or?

did you ever chmod +x the script?

Link to comment
Share on other sites

Link to post
Share on other sites

have you tried to just do each command by hand on the server to figure out which thing is breaking?

Link to comment
Share on other sites

Link to post
Share on other sites

5 hours ago, jdfthetech said:

have you tried to just do each command by hand on the server to figure out which thing is breaking?

The commands that are not working are printF and read

Link to comment
Share on other sites

Link to post
Share on other sites

7 hours ago, AbsoluteFool said:

did you ever chmod +x the script?

I have, the script wont run without it (Because when i put in via SFTP it shows it as a Unknown Source script)

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Nolanrulesroblox said:

The commands that are not working are printF and read

It's not printF, it's printf. Pay more attention to what you write. Also, printf is provided by the package coreutils, ie. apt -y install coreutils on your server. You can also add the following to your script to check for existence of printf and to install it, if it's missing:
 

which printf >/dev/null
if [ $? -eq 1 ]
then
	apt -y install coreutils
fi

 

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

On 2/28/2020 at 3:13 AM, WereCatf said:

It's not printF, it's printf. Pay more attention to what you write. Also, printf is provided by the package coreutils, ie. apt -y install coreutils on your server. You can also add the following to your script to check for existence of printf and to install it, if it's missing:
 


which printf >/dev/null
if [ $? -eq 1 ]
then
	apt -y install coreutils
fi

 

Sorry, in the comment i wrote F but in the script i did make it lowercase

 

Ill give it a try

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×